Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add conditions for the is Raft flag #1432

Merged
merged 1 commit into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ func (bc *BlockChain) WriteBlockWithState(block *types.Block, receipts []*types.
// QUORUM
// checks if the consensus engine is Rfat
func (bc *BlockChain) isRaft() bool {
return bc.chainConfig.IsQuorum && bc.chainConfig.Istanbul == nil && bc.chainConfig.Clique == nil
return bc.chainConfig.IsQuorum && bc.chainConfig.Istanbul == nil && bc.chainConfig.IBFT == nil && bc.chainConfig.QBFT == nil && bc.chainConfig.Clique == nil
}

// function specifically added for Raft consensus. This is called from mintNewBlock
Expand Down
2 changes: 1 addition & 1 deletion permission/permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (p *PermissionCtrl) asyncStart() {
}
p.ethClnt = ethclient.NewClient(client)
p.eth = ethereum
p.isRaft = p.eth.BlockChain().Config().Istanbul == nil && p.eth.BlockChain().Config().Clique == nil
p.isRaft = p.eth.BlockChain().Config().Istanbul == nil && p.eth.BlockChain().Config().IBFT == nil && p.eth.BlockChain().Config().QBFT == nil && p.eth.BlockChain().Config().Clique == nil
p.updateBackEnd()
}

Expand Down