@ -250,7 +250,7 @@ func (p *Peer) writeMessage(msg *ethwire.Msg) {
}
}
peerlogger . Info ln( "<=" , msg . Type , msg . Data )
peerlogger . DebugDetail ln( "<=" , msg . Type , msg . Data )
err := ethwire . WriteMessage ( p . conn , msg )
if err != nil {
@ -324,7 +324,7 @@ func (p *Peer) HandleInbound() {
peerlogger . Debugln ( err )
}
for _ , msg := range msgs {
peerlogger . Info ln( "=>" , msg . Type , msg . Data )
peerlogger . DebugDetail ln( "=>" , msg . Type , msg . Data )
switch msg . Type {
case ethwire . MsgHandshakeTy :
@ -429,7 +429,7 @@ func (p *Peer) HandleInbound() {
if p . catchingUp && msg . Data . Len ( ) > 1 {
if lastBlock != nil {
blockInfo := lastBlock . BlockInfo ( )
peerlogger . Info f( "Synced chain to #%d %x %x\n" , blockInfo . Number , lastBlock . Hash ( ) , blockInfo . Hash )
peerlogger . DebugDetail f( "Synced chain to #%d %x %x\n" , blockInfo . Number , lastBlock . Hash ( ) , blockInfo . Hash )
}
p . catchingUp = false
@ -496,7 +496,7 @@ func (p *Peer) HandleInbound() {
// If a parent is found send back a reply
if parent != nil {
peerlogger . Info f( "Found canonical block, returning chain from: %x " , parent . Hash ( ) )
peerlogger . DebugDetail f( "Found canonical block, returning chain from: %x " , parent . Hash ( ) )
chain := p . ethereum . BlockChain ( ) . GetChainFromHash ( parent . Hash ( ) , amountOfBlocks )
if len ( chain ) > 0 {
//peerlogger.Debugf("Returning %d blocks: %x ", len(chain), parent.Hash())
@ -516,7 +516,7 @@ func (p *Peer) HandleInbound() {
}
}
case ethwire . MsgNotInChainTy :
peerlogger . Info f( "Not in chain: %x\n" , msg . Data . Get ( 0 ) . Bytes ( ) )
peerlogger . DebugDetail f( "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
@ -737,7 +737,7 @@ func (p *Peer) FindCommonParentBlock() {
msgInfo := append ( hashes , uint64 ( len ( hashes ) ) )
peerlogger . Info f( "Asking for block from %x (%d total) from %s\n" , p . ethereum . BlockChain ( ) . CurrentBlock . Hash ( ) , len ( hashes ) , p . conn . RemoteAddr ( ) . String ( ) )
peerlogger . DebugDetail f( "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 )
@ -749,7 +749,7 @@ func (p *Peer) CatchupWithPeer(blockHash []byte) {
msg := ethwire . NewMessage ( ethwire . MsgGetChainTy , [ ] interface { } { blockHash , uint64 ( 50 ) } )
p . QueueMessage ( msg )
peerlogger . Info f( "Requesting blockchain %x... from peer %s\n" , p . ethereum . BlockChain ( ) . CurrentBlock . Hash ( ) [ : 4 ] , p . conn . RemoteAddr ( ) )
peerlogger . DebugDetail f( "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 )