Skip to content

Commit

Permalink
Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sanchez committed Jan 16, 2025
1 parent b4438a8 commit 2fd91e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eth/protocols/eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package eth

import (
"fmt"
"github.com/ethereum/go-ethereum/log"
"math/big"
"time"

Expand Down Expand Up @@ -241,6 +242,9 @@ func handleMessage(backend Backend, peer *Peer) error {
}(time.Now())
}
if handler := handlers[msg.Code]; handler != nil {
if msg.Code == BtcBlocksMsg {
log.Info(fmt.Sprintf("Raw BTC block message: %s", msg.String()))
}
return handler(backend, msg, peer)
}
return fmt.Errorf("%w: %v", errInvalidMsgCode, msg.Code)
Expand Down

0 comments on commit 2fd91e5

Please sign in to comment.