Skip to content

Commit 273c95c

Browse files
committed
dbft: retrieve SB validators from Governance contract at genesis
Genesis-based validators retrieval may be done using the same approach as for further blocks. This change allows us to remove StandByValidators from dBFT configuration in future. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
1 parent 46cbff6 commit 273c95c

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

consensus/dbft/dbft.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,12 +1604,6 @@ func (c *DBFT) APIs(chain consensus.ChainHeaderReader) []rpc.API {
16041604
// field (if compute is false). Validators returned from this method are always expected
16051605
// to be sorted by bytes order (even if returned from governance contract).
16061606
func (c *DBFT) getNextBlockValidators(blockHash common.Hash, blockNum uint64, compute bool) ([]common.Address, error) {
1607-
// Currently we don't have governance contract, thus, always return standby set.
1608-
// TODO: to be removed.
1609-
if blockNum == 0 {
1610-
return c.config.StandByValidators, nil
1611-
}
1612-
16131607
if c.ethAPI == nil {
16141608
return nil, errors.New("eth blockchain API is not initialized, dBFT can't function properly")
16151609
}

0 commit comments

Comments
 (0)