Do not accept block proposal with bad shard state

pull/839/head
Eugene Kim 6 years ago
parent d0d130bc4b
commit 2fb4d1ba4c
  1. 3
      node/node_handler.go

@ -261,8 +261,7 @@ func (node *Node) VerifyNewBlock(newBlock *types.Block) error {
err = node.blockchain.ValidateNewShardState(newBlock, &node.CurrentStakes)
if err != nil {
utils.GetLogInstance().Debug("Failed to verify new sharding state", "err", err)
// TODO ek – fail here too
return ctxerror.New("failed to verify sharding state").WithCause(err)
}
return nil
}

Loading…
Cancel
Save