core: ensure we produce correct blocks for tests

Check for correct merkle root generation.
This commit is contained in:
Roman Khimov 2020-05-07 21:46:28 +03:00
parent bd98940a54
commit c9b1d359d8

View file

@ -71,7 +71,10 @@ func newBlock(cfg config.ProtocolConfiguration, index uint32, prev util.Uint256,
},
Transactions: txs,
}
_ = b.RebuildMerkleRoot()
err := b.RebuildMerkleRoot()
if err != nil {
panic(err)
}
b.Script.InvocationScript = testchain.Sign(b.GetSignedPart())
return b