Skip to content

fix: full_scan covers revealed range before applying stop_gap#2182

Open
noahjoeris wants to merge 1 commit intobitcoindevkit:masterfrom
noahjoeris:fix/full_scan
Open

fix: full_scan covers revealed range before applying stop_gap#2182
noahjoeris wants to merge 1 commit intobitcoindevkit:masterfrom
noahjoeris:fix/full_scan

Conversation

@noahjoeris
Copy link
Copy Markdown

Fixes #2057. full_scan now always covers the revealed range before applying the stop_gap

Notes to the reviewers

Replaces #2181. That PR unified full_scan and sync into one path; per @evanlinjin's feedback we're keeping them separate and doing the minimal fix here instead

Changelog notice

Fixed: full_scan now always scans the full revealed range before applying stop_gap past last_revealed.

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

Comment on lines +273 to +280
#[allow(clippy::too_many_arguments)]
fn populate_with_spks(
&self,
start_time: u64,
tx_update: &mut TxUpdate<ConfirmationBlockTime>,
mut spks_with_expected_txids: impl Iterator<Item = (u32, SpkWithExpectedTxids)>,
stop_gap: usize,
last_revealed: Option<u32>,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Should we combine some parameters to avoid suppressing clippy::too_many_arguments? e.g.

struct StopGapExt {
  stop_gap: usize
  last_revealed Option<u32>
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Unintuitive and undocumented full_scan behavior

1 participant