Consensus doesn't require anymore `Node` as a circular dependency.

pull/4377/head
frozen 2 years ago committed by Casey Gardiner
parent d8a6fb4db4
commit 5de514d45e
  1. 15
      core/blockchain_impl.go

@ -327,19 +327,8 @@ func VerifyBlockCrossLinks(blockchain BlockChain, block *types.Block) error {
// ReadCrossLink beacon chain usage.
cl, err := blockchain.ReadCrossLink(crossLink.ShardID(), crossLink.BlockNum())
if err == nil && cl != nil {
utils.Logger().Err(errAlreadyExist).
Uint64("beacon-block-number", block.NumberU64()).
Interface("remote", crossLink).
Interface("local", cl).
Msg("[CrossLinkVerification]")
// TODO Add slash for exist same blocknum but different crosslink
return errors.Wrapf(
errAlreadyExist,
"[CrossLinkVerification] shard: %d block: %d on beacon block %d",
crossLink.ShardID(),
crossLink.BlockNum(),
block.NumberU64(),
)
// Add slash for exist same blocknum but different crosslink
return errAlreadyExist
}
if err := VerifyCrossLink(blockchain, crossLink); err != nil {
return errors.Wrapf(err, "cannot VerifyBlockCrossLinks")

Loading…
Cancel
Save