Skip to content

p2p: TryLowWorkHeadersSync follow-ups - #26387

Closed
dergoegge wants to merge 2 commits into
bitcoin:masterfrom
dergoegge:2022-10-tlwhs-doc-fixup
Closed

dergoegge wants to merge 2 commits into
bitcoin:masterfrom
dergoegge:2022-10-tlwhs-doc-fixup

Conversation

@dergoegge

@dergoegge dergoegge commented Oct 25, 2022 •

Copy link
Copy Markdown
Member

@mzumsande mzumsande left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK e891aab

@maflcko

maflcko commented Oct 25, 2022

Copy link
Copy Markdown
Member

Maybe also address #26355 (comment) ?

…n TryLowWorkHeaderSync

`m_headers_sync` is already reset in IsContinuationOfLowWorkHeadersSync
if there is a failure, so there is no need to also reset in
TryLowWorkHeaderSync.
@dergoegge dergoegge changed the title doc: Fixup TryLowWorkHeadersSync comment (#26355 follow-up) p2p: #26355 follow-ups Oct 26, 2022
@dergoegge

Copy link
Copy Markdown
Member Author

Maybe also address #26355 (comment) ?

Added a commit for that comment.

@hernanmarino hernanmarino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 784b023

@brunoerg brunoerg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crACK 784b023

@maflcko maflcko changed the title p2p: #26355 follow-ups p2p: TryLowWorkHeadersSync follow-ups Oct 28, 2022
@maflcko maflcko removed the Docs label Oct 28, 2022
@DrahtBot DrahtBot added the P2P label Oct 28, 2022
@fanquake
fanquake requested a review from mzumsande October 28, 2022 11:37

@mzumsande mzumsande left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 784b023

I checked that IsContinuationOfLowWorkHeadersSync calls ProcessNextHeaders, which sets the state to FINAL if unsuccessful, resulting in IsContinuationOfLowWorkHeadersSync doing the cleanup of m_headers_sync and m_headers_presync_stats, so it is correct to remove the same cleanup in TryLowWorkHeadersSync.

fanquake added a commit to bitcoin-core/gui that referenced this pull request Oct 31, 2022
784b023 [net processing] Simplify use of IsContinuationOfLowWorkHeadersSync in TryLowWorkHeaderSync (dergoegge)
e891aab [net processing] Fixup TryLowWorkHeadersSync comment (dergoegge)

Pull request description:

  See bitcoin/bitcoin#26355 (comment) and bitcoin/bitcoin#26355 (comment)

ACKs for top commit:
  hernanmarino:
    ACK 784b023
  brunoerg:
    crACK 784b023
  mzumsande:
    ACK 784b023

Tree-SHA512: b47ac0d78a09ca3a1806e38c5d2e2fcf1e5f0668f202450b5079c5cb168e168ac6828c0948d23f3610696375134986d75ef3c6098858173023bcb743aec8004c
@fanquake

Copy link
Copy Markdown
Member

This has been merged.

@fanquake fanquake closed this Oct 31, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Oct 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants