forked from TrueCloudLab/neoneo-go
core: fix bug in consensus
We should set MerkleRoot in approving block irrespective to transactions presented in the block.
This commit is contained in:
parent
e8ad09f30d
commit
45b8bdb51c
1 changed files with 2 additions and 4 deletions
|
@ -500,9 +500,7 @@ func newBlockFromContext(ctx *dbft.Context) block.Block {
|
||||||
Nonce: ctx.Nonce,
|
Nonce: ctx.Nonce,
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(ctx.TransactionHashes) != 0 {
|
|
||||||
mt := merkle.NewMerkleTree(append([]util.Uint256{consensusData.Hash()}, ctx.TransactionHashes...)...)
|
mt := merkle.NewMerkleTree(append([]util.Uint256{consensusData.Hash()}, ctx.TransactionHashes...)...)
|
||||||
block.Block.MerkleRoot = mt.Root().Hash
|
block.Block.MerkleRoot = mt.Root().Hash
|
||||||
}
|
|
||||||
return block
|
return block
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue