@ -419,7 +419,7 @@ func (p *Peer) HandleInbound() {
if p . catchingUp && msg . Data . Len ( ) > 1 {
if lastBlock != nil {
blockInfo := lastBlock . BlockInfo ( )
ethutil . Config . Log . Debugf ( "Synced chain to #%d %x %x\n" , blockInfo . Number , lastBlock . Hash ( ) , blockInfo . Hash )
ethutil . Config . Log . Printf ( ethutil . LogLevelSystem , "Synced chain to #%d %x %x\n" , blockInfo . Number , lastBlock . Hash ( ) , blockInfo . Hash )
}
p . catchingUp = false
@ -486,7 +486,7 @@ func (p *Peer) HandleInbound() {
// If a parent is found send back a reply
if parent != nil {
ethutil . Config . Log . Debugf ( "[PEER] Found canonical block, returning chain from: %x " , parent . Hash ( ) )
ethutil . Config . Log . Printf ( ethutil . LogLevelSystem , "[PEER] Found canonical block, returning chain from: %x " , parent . Hash ( ) )
chain := p . ethereum . BlockChain ( ) . GetChainFromHash ( parent . Hash ( ) , amountOfBlocks )
if len ( chain ) > 0 {
//ethutil.Config.Log.Debugf("[PEER] Returning %d blocks: %x ", len(chain), parent.Hash())
@ -506,7 +506,7 @@ func (p *Peer) HandleInbound() {
}
}
case ethwire . MsgNotInChainTy :
ethutil . Config . Log . Debugf ( "Not in chain: %x\n" , msg . Data . Get ( 0 ) . Bytes ( ) )
ethutil . Config . Log . Printf ( ethutil . LogLevelSystem , "Not in chain: %x\n" , msg . Data . Get ( 0 ) . Bytes ( ) )
if p . diverted == true {
// If were already looking for a common parent and we get here again we need to go deeper
p . blocksRequested = p . blocksRequested * 2
@ -727,7 +727,7 @@ func (p *Peer) FindCommonParentBlock() {
msgInfo := append ( hashes , uint64 ( len ( hashes ) ) )
ethutil . Config . Log . Infof ( "Asking for block from %x (%d total) from %s\n" , p . ethereum . BlockChain ( ) . CurrentBlock . Hash ( ) , len ( hashes ) , p . conn . RemoteAddr ( ) . String ( ) )
ethutil . Config . Log . Printf ( ethutil . LogLevelSystem , "Asking for block from %x (%d total) from %s\n" , p . ethereum . BlockChain ( ) . CurrentBlock . Hash ( ) , len ( hashes ) , p . conn . RemoteAddr ( ) . String ( ) )
msg := ethwire . NewMessage ( ethwire . MsgGetChainTy , msgInfo )
p . QueueMessage ( msg )
@ -739,7 +739,7 @@ func (p *Peer) CatchupWithPeer(blockHash []byte) {
msg := ethwire . NewMessage ( ethwire . MsgGetChainTy , [ ] interface { } { blockHash , uint64 ( 50 ) } )
p . QueueMessage ( msg )
ethutil . Config . Log . Debugf ( "Requesting blockchain %x... from peer %s\n" , p . ethereum . BlockChain ( ) . CurrentBlock . Hash ( ) [ : 4 ] , p . conn . RemoteAddr ( ) )
ethutil . Config . Log . Printf ( ethutil . LogLevelSystem , "Requesting blockchain %x... from peer %s\n" , p . ethereum . BlockChain ( ) . CurrentBlock . Hash ( ) [ : 4 ] , p . conn . RemoteAddr ( ) )
msg = ethwire . NewMessage ( ethwire . MsgGetTxsTy , [ ] interface { } { } )
p . QueueMessage ( msg )