diff --git a/chain/vm/syscalls.go b/chain/vm/syscalls.go index 10632611a..887e138fd 100644 --- a/chain/vm/syscalls.go +++ b/chain/vm/syscalls.go @@ -74,11 +74,6 @@ func (ss *syscallShim) VerifyConsensusFault(a, b, extra []byte) (*runtime.Consen // (0) cheap preliminary checks - // are blocks the same? - if bytes.Equal(a, b) { - return nil, fmt.Errorf("no consensus fault: submitted blocks are the same") - } - // can blocks be decoded properly? var blockA, blockB types.BlockHeader if decodeErr := blockA.UnmarshalCBOR(bytes.NewReader(a)); decodeErr != nil { @@ -89,6 +84,11 @@ func (ss *syscallShim) VerifyConsensusFault(a, b, extra []byte) (*runtime.Consen return nil, xerrors.Errorf("cannot decode second block header: %f", decodeErr) } + // are blocks the same? + if blockA.Cid().Equals(blockB.Cid()) { + return nil, fmt.Errorf("no consensus fault: submitted blocks are the same") + } + // (1) check conditions necessary to any consensus fault // were blocks mined by same miner?