Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spv: Move getheaders stage to global syncer instead of per-peer #2300

Merged
merged 2 commits into from
Nov 17, 2023

Commits on Nov 17, 2023

  1. spv: Fetch headers in syncer instead of peer startup

    This moves the fetch headers and cfilters from the peer startup to the
    syncer startup.
    
    This avoids wasting duplicate effort for every peer. In the future, this
    will allow using multiple peers to fetch headers and cfilters from, as
    well as allowing asynchronous fetching.
    matheusd committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    eaaca07 View commit details
    Browse the repository at this point in the history
  2. spv: Drop syncer-global block locators

    The locators are now only needed during the initial getHeaders sync
    stage, therefore they are not needed in the global syncer struct.
    
    Since they are accessed only from a single goroutine now, the mutex is
    also unneeded.
    matheusd committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    0203f76 View commit details
    Browse the repository at this point in the history