Skip to content

Collect the raw mempool txids into a HashSet - #1068

Open
tankyleo wants to merge 1 commit into
lightningdevkit:mainfrom
tankyleo:2026-08-raw-mempool-hashset
Open

Collect the raw mempool txids into a HashSet#1068
tankyleo wants to merge 1 commit into
lightningdevkit:mainfrom
tankyleo:2026-08-raw-mempool-hashset

Conversation

@tankyleo

Copy link
Copy Markdown
Contributor
    Collect the raw mempool txids into a HashSet

    Mempool reconciliation checks every cached transaction against the raw
    mempool response. Using a Vec to store the raw mempool txids makes each
    membership check linear and the retention pass quadratic. Store the
    txids in a HashSet to make membership checks expected constant time and
    reconciliation expected linear.

    Co-Authored-By: HAL 9000

Mempool reconciliation checks every cached transaction against the raw
mempool response. Using a Vec to store the raw mempool txids makes each
membership check linear and the retention pass quadratic. Store the
txids in a HashSet to make membership checks expected constant time and
reconciliation expected linear.

Co-Authored-By: HAL 9000
@ldk-reviews-bot

ldk-reviews-bot commented Aug 25, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @benthecarman as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tankyleo
tankyleo requested a review from benthecarman August 25, 2026 05:45
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