Skip to content

Commit

Permalink
vote: disable votepool when bsc protocol not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanBSC committed Aug 7, 2023
1 parent c208d28 commit 48bcc60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion consensus/parlia/parlia.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ func (p *Parlia) assembleVoteAttestation(chain consensus.ChainHeaderReader, head
}

if p.VotePool == nil {
return errors.New("vote pool is nil")
return nil
}

// Fetch direct parent's votes
Expand Down
2 changes: 1 addition & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData))

// Create voteManager instance
if posa, ok := eth.engine.(consensus.PoSA); ok {
if posa, ok := eth.engine.(consensus.PoSA); ok && !config.DisableBscProtocol {
// Create votePool instance
votePool := vote.NewVotePool(chainConfig, eth.blockchain, posa)
eth.votePool = votePool
Expand Down

0 comments on commit 48bcc60

Please sign in to comment.