The PR fixes the case when dutyRole is BNRoleAttester.
Currently, the result in this case is RoleUnknown because BNRoleAttester | BNRoleSyncCommittee == 0 | 3 == 3, so RoleCommittee is returned only for BNRoleSyncCommittee. This would've worked if roles were powers of two, but they are just iota.
TestMapDutyToRunnerRole shows the change, it passes with the change in MapDutyToRunnerRole and fails without it.
The PR fixes the case when
dutyRole
isBNRoleAttester
.Currently, the result in this case is
RoleUnknown
becauseBNRoleAttester | BNRoleSyncCommittee == 0 | 3 == 3
, soRoleCommittee
is returned only forBNRoleSyncCommittee
. This would've worked if roles were powers of two, but they are justiota
.TestMapDutyToRunnerRole
shows the change, it passes with the change inMapDutyToRunnerRole
and fails without it.