Skip to content

Commit

Permalink
Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sanchez committed Jan 15, 2025
1 parent f442ef7 commit 7d45eb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eth/protocols/eth/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,16 @@ func handleGetBTCBlocks(backend Backend, msg Decoder, peer *Peer) error {
// Decode the block body retrieval message
var query GetBTCBlocksPacket
if err := msg.Decode(&query); err != nil {
log.Error("Unable to decode GetBTCBlocksPacket", "err", err)
return fmt.Errorf("%w: message %v: %v", errDecode, msg, err)
}
response := ServiceGetBTCBlocksQuery(backend.Chain(), query.GetBTCBlocksRequest)
return peer.ReplyBTCBlocksRLP(query.RequestId, response)
}

func ServiceGetBTCBlocksQuery(chain *core.BlockChain, query GetBTCBlocksRequest) []rlp.RawValue {
log.Info("ServiceGetBTCBlocksQuery called")

// Gather Bitcoin blocks until the fetch or network limits is reached
var (
bytesCount int
Expand Down

0 comments on commit 7d45eb3

Please sign in to comment.