Discussed in #27278 (comment)
0Saw 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.