Proactive checking for empty groups (#7234)

This commit is contained in:
Jaco 2022-03-25 16:10:06 +01:00 committed by GitHub
parent fc752f4bf8
commit 1c0a9eeec4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ function mapValidators (startWith: Record<string, [GroupIndex, ValidatorInfo[]]>
...all,
[id.toString()]: [
assignment.groupIdx,
groups[assignment.groupIdx.toNumber()]
(groups[assignment.groupIdx.toNumber()] || [])
.map((index) => [index, indices[index.toNumber()]])
.filter(([, a]) => a)
.map(([indexActive, indexValidator]) => ({