aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm
diff options
context:
space:
mode:
authorAaron Buchwald <[email protected]>2020-11-09 15:34:14 -0500
committerAaron Buchwald <[email protected]>2020-11-09 15:34:14 -0500
commit419cd2d882b93bd98f54957a15c25716fca09123 (patch)
tree449b53fd8522acc9adb54e93fdc50815f36000d9 /plugin/evm
parentd7f430c196e0856eaaeedbfe1fcc30c1c472cd43 (diff)
Fix byte comparison
Diffstat (limited to 'plugin/evm')
-rw-r--r--plugin/evm/vm.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index 4b3c2bb..284a772 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -4,7 +4,6 @@
package evm
import (
- "bytes"
"crypto/rand"
"encoding/json"
"errors"
@@ -448,8 +447,7 @@ func (vm *VM) ParseBlock(b []byte) (snowman.Block, error) {
}
blockHash := ethBlock.Hash()
// Coinbase must be zero on C-Chain
- if !bytes.Equal(blockHash.Bytes(), vm.genesisHash.Bytes()) &&
- !bytes.Equal(ethBlock.Coinbase().Bytes(), coreth.BlackholeAddr.Bytes()) {
+ if blockHash != vm.genesisHash && ethBlock.Coinbase() != coreth.BlackholeAddr {
return nil, errInvalidBlock
}
block := &Block{