From 419cd2d882b93bd98f54957a15c25716fca09123 Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Mon, 9 Nov 2020 15:34:14 -0500 Subject: Fix byte comparison --- plugin/evm/vm.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'plugin') 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{ -- cgit v1.2.3-70-g09d2