Skip to content

Log which peer sent us a header (first) #27744

@Sjors

Description

@Sjors

Discussed in #27278 (comment)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions