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 a60a12e commit e3b903e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eth/protocols/eth/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,10 @@ func ServiceGetBTCBlocksQuery(chain *core.BlockChain, query GetBTCBlocksRequest)
blockBytes := blockBuf.Bytes()
if len(blockBytes) != 0 {
btcBlock := common.BytesToBitcoinBlock(blockBytes)
log.Info(fmt.Sprintf("Serialized BTC block bytes: %x", blockBytes[:]))
log.Info(fmt.Sprintf("Serialized BTC block bytes: %x", blockBytes[:]), "len", len(blockBytes))
log.Info(fmt.Sprintf("BTC block struct: %x", btcBlock.Bytes()), "len", len(btcBlock.Bytes()))
rlpBytes, err := rlp.EncodeToBytes(&btcBlock)
log.Info(fmt.Sprintf("RLP-encoded BTC block bytes: %x", rlpBytes[:]))
log.Info(fmt.Sprintf("RLP-encoded BTC block bytes: %x", rlpBytes[:]), "len", len(rlpBytes))
if err != nil {
log.Error(fmt.Sprintf("error RLP-encoding BTC block %s", hash.String()), "err", err)
}
Expand Down

0 comments on commit e3b903e

Please sign in to comment.