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.
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user