mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 09:02:28 +00:00
consensus/network: reinit dbft after block addition
Don't stall on some height if everyone else have moved up already. Fix #673.
This commit is contained in:
parent
c5d54e9992
commit
37c48b00b4
2 changed files with 32 additions and 9 deletions
|
@ -99,7 +99,11 @@ func NewServer(config ServerConfig, chain core.Blockchainer, log *zap.Logger) (*
|
|||
log: log,
|
||||
}
|
||||
s.bQueue = newBlockQueue(maxBlockBatch, chain, log, func(b *block.Block) {
|
||||
s.tryStartConsensus()
|
||||
if s.consensusStarted.Load() {
|
||||
s.consensus.OnNewBlock()
|
||||
} else {
|
||||
s.tryStartConsensus()
|
||||
}
|
||||
s.relayBlock(b)
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue