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) err = node.blockchain.ValidateNewShardState(newBlock, &node.CurrentStakes)
if err != nil { if err != nil {
utils.GetLogInstance().Debug("Failed to verify new sharding state", "err", err) return ctxerror.New("failed to verify sharding state").WithCause(err)
// TODO ek – fail here too
} }
return nil return nil
} }

Loading…
Cancel
Save