Commit eff6a434 authored by obscuren's avatar obscuren

Removed debugging

parent 7a18a393
...@@ -622,8 +622,6 @@ func (self *BlockPool) AddBlock(block *types.Block, peerId string) { ...@@ -622,8 +622,6 @@ func (self *BlockPool) AddBlock(block *types.Block, peerId string) {
entry := self.get(hash) entry := self.get(hash)
fmt.Println("block number", block.Number())
defer fmt.Println("AddBlock done")
// a peer's current head block is appearing the first time // a peer's current head block is appearing the first time
if hash == sender.currentBlockHash { if hash == sender.currentBlockHash {
if sender.currentBlock == nil { if sender.currentBlock == nil {
......
...@@ -447,11 +447,6 @@ func (self *ChainManager) procFutureBlocks() { ...@@ -447,11 +447,6 @@ func (self *ChainManager) procFutureBlocks() {
} }
func (self *ChainManager) InsertChain(chain types.Blocks) error { func (self *ChainManager) InsertChain(chain types.Blocks) error {
if len(chain) > 0 {
fmt.Println("insert chain", len(chain))
defer fmt.Println("insert chain done")
}
// A queued approach to delivering events. This is generally faster than direct delivery and requires much less mutex acquiring. // A queued approach to delivering events. This is generally faster than direct delivery and requires much less mutex acquiring.
var queue = make([]interface{}, len(chain)) var queue = make([]interface{}, len(chain))
var queueEvent = queueEvent{queue: queue} var queueEvent = queueEvent{queue: queue}
...@@ -471,13 +466,11 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { ...@@ -471,13 +466,11 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error {
// Do not penelise on future block. We'll need a block queue eventually that will queue // Do not penelise on future block. We'll need a block queue eventually that will queue
// future block for future use // future block for future use
if err == BlockFutureErr { if err == BlockFutureErr {
fmt.Println("added future block", block.Number())
self.futureBlocks.Push(block) self.futureBlocks.Push(block)
continue continue
} }
if IsParentErr(err) && self.futureBlocks.Has(block.ParentHash()) { if IsParentErr(err) && self.futureBlocks.Has(block.ParentHash()) {
fmt.Println("added future block 2", block.Number())
self.futureBlocks.Push(block) self.futureBlocks.Push(block)
continue continue
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment