Skip to content

Conversation

@danielabrozzoni
Copy link
Owner

No description provided.

sipa and others added 9 commits November 17, 2025 11:11
Just don't call this function when it won't have any effect.

Note that we can't remove the LookupBlockIndex call, since `last_received_header`
is needed to check if new headers were received (`received_new_header`).
Avoid the need to construct a CBlockIndex object just to compute work for a header,
when its nBits value suffices for that.

Co-Authored-By: Pieter Wuille <[email protected]>
There is no need for a function to convert a CBlock to a CBlockHeader, as it's a child
class of it.
No need to pass consensusParams, as CheckHeadersPoW already has access
to m_chainparams.GetConsensus()

Co-Authored-By: maflcko <[email protected]>
Also mark CompressedHeader as explicit, and GetFullHeader as const

Co-Authored-By: Aurèle Oulès <[email protected]>
chain_start can never be null, so it's better to pass it as a reference
rather than a raw pointer

Also slightly reformat HeaderSyncState constructor to make clang-format
happy

Co-Authored-By: maflcko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants