forked from TrueCloudLab/neoneo-go
network: correct block addition check
Fixes missing an error on block addition when the header actually went it, but the block didn't.
This commit is contained in:
parent
0b96e6a048
commit
5a42b5c7ae
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ func (bq *blockQueue) run() {
|
|||
err := bq.chain.AddBlock(minblock)
|
||||
if err != nil {
|
||||
// The block might already be added by consensus.
|
||||
if _, errget := bq.chain.GetBlock(minblock.Hash()); errget != nil {
|
||||
if bq.chain.BlockHeight() < minblock.Index {
|
||||
bq.log.Warn("blockQueue: failed adding block into the blockchain",
|
||||
zap.String("error", err.Error()),
|
||||
zap.Uint32("blockHeight", bq.chain.BlockHeight()),
|
||||
|
|
Loading…
Reference in a new issue