Issue Details

Number
27744
Title
Log which peer sent us a header (first)
Description
Discussed in https://github.com/bitcoin/bitcoin/pull/27278#issuecomment-1478368582 ``` Saw new header hash=... height=... ``` It would be useful to add the node id to this message. The validation code doesn't know which peer the header came from, so we'd have to move the log entry to net_processing. One way is to add a helper function `LogBlockHeader` and call it right after both `ProcessNewBlockHeaders(header, peer, compact_blk)` calls in net_processing, only if they return true. Since we process headers in batches, it's perhaps easiest to only log the last header. Doing so would also make the log less noisy when the header is received via a compact block, because this is the same site that produces the `Saw new cmpctblock header hash` message.
URL
https://github.com/bitcoin/bitcoin/issue/27744
Closed by
#27826
Back to List