aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-09-23 18:57:33 +0800
committerFelix Lange <fjl@twurst.com>2015-09-23 18:57:33 +0800
commit7a2a9180670705cde50844a5a6e4d6825871d60f (patch)
tree10911fa1faaf3638145e63c8a630cbba6fb80f78 /cmd
parente456f27795d3d306d4bb52ef0101b9cdad7a27cd (diff)
parent90cd8ae9f28b7caac93b5c8d555a11e6be90a9eb (diff)
downloadgo-tangerine-7a2a9180670705cde50844a5a6e4d6825871d60f.tar
go-tangerine-7a2a9180670705cde50844a5a6e4d6825871d60f.tar.gz
go-tangerine-7a2a9180670705cde50844a5a6e4d6825871d60f.tar.bz2
go-tangerine-7a2a9180670705cde50844a5a6e4d6825871d60f.tar.lz
go-tangerine-7a2a9180670705cde50844a5a6e4d6825871d60f.tar.xz
go-tangerine-7a2a9180670705cde50844a5a6e4d6825871d60f.tar.zst
go-tangerine-7a2a9180670705cde50844a5a6e4d6825871d60f.zip
Merge pull request #1842 from fjl/rpc-fix-unknown-block
rpc/api: don't crash for unknown blocks
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/blocktestcmd.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/cmd/geth/blocktestcmd.go b/cmd/geth/blocktestcmd.go
index d3257ca4d..d6195e025 100644
--- a/cmd/geth/blocktestcmd.go
+++ b/cmd/geth/blocktestcmd.go
@@ -91,7 +91,6 @@ func runBlockTest(ctx *cli.Context) {
if err != nil {
utils.Fatalf("%v", err)
}
- defer ethereum.Stop()
if rpc {
fmt.Println("Block Test post state validated, starting RPC interface.")
startEth(ctx, ethereum)
@@ -106,7 +105,6 @@ func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, er
cfg.MaxPeers = 0 // disable network
cfg.Shh = false // disable whisper
cfg.NAT = nil // disable port mapping
-
ethereum, err := eth.New(cfg)
if err != nil {
return nil, err
@@ -114,7 +112,6 @@ func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, er
// import the genesis block
ethereum.ResetWithGenesisBlock(test.Genesis)
-
// import pre accounts
_, err = test.InsertPreState(ethereum)
if err != nil {
@@ -122,16 +119,13 @@ func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, er
}
cm := ethereum.ChainManager()
-
validBlocks, err := test.TryBlocksInsert(cm)
if err != nil {
return ethereum, fmt.Errorf("Block Test load error: %v", err)
}
-
newDB := cm.State()
if err := test.ValidatePostState(newDB); err != nil {
return ethereum, fmt.Errorf("post state validation failed: %v", err)
}
-
return ethereum, test.ValidateImportedHeaders(cm, validBlocks)
}