diff options
author | obscuren <geffobscura@gmail.com> | 2015-06-15 22:46:45 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-06-15 22:46:45 +0800 |
commit | e79cc42dfe36f6db61cebb37607f5bfe89e4cdcc (patch) | |
tree | 2162d4bcb3409ab843261ab1001c8217dc264d49 /core/chain_manager.go | |
parent | 21fa29111b3cd12e3748fcb6310e6a18c5562f17 (diff) | |
download | go-tangerine-e79cc42dfe36f6db61cebb37607f5bfe89e4cdcc.tar.gz go-tangerine-e79cc42dfe36f6db61cebb37607f5bfe89e4cdcc.tar.zst go-tangerine-e79cc42dfe36f6db61cebb37607f5bfe89e4cdcc.zip |
core: moved check for max queue to checkQueue
Moved the queue to check to the checkQueue method so no undeeded loops
need to be initiated or sorting needs to happen twice.
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r-- | core/chain_manager.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index e56d82cce..c3b7273c2 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -5,7 +5,6 @@ import ( "fmt" "io" "math/big" - "os" "runtime" "sync" "sync/atomic" @@ -235,15 +234,8 @@ func (bc *ChainManager) setLastState() { if block != nil { bc.currentBlock = block bc.lastBlockHash = block.Hash() - } else { // TODO CLEAN THIS UP TMP CODE - block = bc.GetBlockByNumber(400000) - if block == nil { - fmt.Println("Fatal. LastBlock not found. Report this issue") - os.Exit(1) - } - bc.currentBlock = block - bc.lastBlockHash = block.Hash() - bc.insert(block) + } else { + glog.Fatalf("Fatal. LastBlock not found. Please run removedb and resync") } } else { bc.Reset() |