aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/vm.go
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2020-07-22 23:31:01 -0400
committerDeterminant <tederminant@gmail.com>2020-07-23 22:20:32 -0400
commit43af06a5fbf3808519b94db7aec1d01f2e753e94 (patch)
tree0b253a89e05c4807c5d448ec07467b609d35002d /plugin/evm/vm.go
parent13ebd8bd9468e9d769d598b0ca2afb72ba78cb97 (diff)
verify whether Block fields are in agreement with the header
Diffstat (limited to 'plugin/evm/vm.go')
-rw-r--r--plugin/evm/vm.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index 4b16f71..c710b9d 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -314,6 +314,9 @@ func (vm *VM) ParseBlock(b []byte) (snowman.Block, error) {
if err := rlp.DecodeBytes(b, ethBlock); err != nil {
return nil, err
}
+ if !vm.chain.VerifyBlock(ethBlock) {
+ return nil, errInvalidBlock
+ }
blockHash := ethBlock.Hash()
// Coinbase must be zero on C-Chain
if bytes.Compare(blockHash.Bytes(), vm.genesisHash.Bytes()) != 0 &&