aboutsummaryrefslogtreecommitdiff
path: root/examples/chain/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/chain/main.go')
-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 7b2ce8e..cd9a8f9 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()))