From b6b1de9657765925b888e933102d3d1c0a67ebac Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Mon, 27 May 2019 23:31:40 -0700 Subject: [PATCH] Do not panic upon out-of-range account index Out-of-range account index (currently >= 200) translates into a shard ID (>= 4) not found in the genesis table, so its genesis cannot be initialized. Since this can be induced by misconfiguration, do not panic but just crit out. This error was seen during drum testnet launch. --- node/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/node.go b/node/node.go index b472b9874..0b4b7f3d7 100644 --- a/node/node.go +++ b/node/node.go @@ -206,7 +206,7 @@ func (node *Node) Blockchain() *core.BlockChain { if err != nil { err = ctxerror.New("cannot get shard chain", "shardID", shardID). WithCause(err) - panic(err) //ctxerror.Log15(utils.GetLogger().Crit, err) + ctxerror.Log15(utils.GetLogger().Crit, err) } return bc }