Clarify mismatched merkle root error message.
This commit is contained in:
parent
077e1ec336
commit
04d88d01ec
1 changed files with 3 additions and 2 deletions
|
@ -452,8 +452,9 @@ func (b *BlockChain) checkBlockSanity(block *btcutil.Block) error {
|
|||
merkles := BuildMerkleTreeStore(block)
|
||||
calculatedMerkleRoot := merkles[len(merkles)-1]
|
||||
if !header.MerkleRoot.IsEqual(calculatedMerkleRoot) {
|
||||
str := fmt.Sprintf("block merkle root is invalid - got %v, "+
|
||||
"want %v", calculatedMerkleRoot, header.MerkleRoot)
|
||||
str := fmt.Sprintf("block merkle root is invalid - block "+
|
||||
"header indicates %v, but calculated value is %v",
|
||||
header.MerkleRoot, calculatedMerkleRoot)
|
||||
return RuleError(str)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue