aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/chain/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/chain/main.go b/examples/chain/main.go
index 5edd055..26fc5ce 100644
--- a/examples/chain/main.go
+++ b/examples/chain/main.go
@@ -91,6 +91,9 @@ func NewTestChain(name string, config *eth.Config,
if err != nil {
panic(err)
}
+ if !tc.chain.VerifyBlock(block) {
+ panic("invalid block")
+ }
tc.chain.InsertChain([]*types.Block{block})
tc.insertBlock(block)
log.Info(fmt.Sprintf("%s: got block %s, sending ack", name, block.Hash().Hex()))