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

Refactor/rename electrum_ext and esplora_ext to have sync and full_scan functions #1235

Merged

Conversation

notmandatory
Copy link
Member

@notmandatory notmandatory commented Dec 7, 2023

Description

fixes #1112

Simple function renaming plus updated docs:

  1. electrum_ext: rename functions scan_without_keychain to sync and scan to full_scan
  2. esplora_ext: rename functions scan_txs to sync and scan_txs_with_keychains to full_scan

Notes to the reviewers

The esplora_ext changes were partially fixed in #1070 but I renamed again so the functions match names suggested in #1112 agreed on in discord poll, sync and full_scan.

Changelog notice

Changed

  • electrum_ext: rename functions scan_without_keychain to sync and scan to full_scan
  • esplora_ext: rename functions scan_txs to sync and scan_txs_with_keychains to full_scan

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

@notmandatory notmandatory self-assigned this Dec 7, 2023
@notmandatory notmandatory added this to the 1.0.0-alpha.3 milestone Dec 7, 2023
@LLFourn
Copy link
Contributor

LLFourn commented Dec 7, 2023

  1. I think that people preferred some other names. This didn't make it into the issue :(. I remmber there was a discord poll cc @danielabrozzoni
  2. It would be really good if we could do as I mentioned in the issue and remove the arguments to scan_with_keychain (or whatever it ends up being called) except for the stop gap and the keychain and spks (and chain specific options like parallel requests). scan_with_keychain should be a minimal and sepcialized function.
  3. The documentation needs to be updated to reflect this. One bit of it even calls scan_with_keychain "the star of the show" when we are trying to explain that it is NOT that. It is the opposite of that. It is the ugly inflexible understudy who is only called up when you need to recover from seed!

@LLFourn
Copy link
Contributor

LLFourn commented Dec 7, 2023

@notmandatory
Copy link
Member Author

notmandatory commented Dec 7, 2023

Oh ya, I was thinking that poll was for Wallet but makes sense we also need to change the names and docs here, will do it. The winners of the poll that I'll use are full_scan and sync.

@notmandatory notmandatory changed the title Refactor/rename electrum_ext and esplora_ext to have scan and scan_with_keychain functions Refactor/rename electrum_ext and esplora_ext to have sync and full_scan functions Dec 7, 2023
@notmandatory notmandatory force-pushed the refactor/rename_scan_functions branch 2 times, most recently from a467077 to 4cb781b Compare December 8, 2023 00:03
@notmandatory
Copy link
Member Author

Functions renamed plus I updated the docs.

Copy link
Contributor

@ValuedMammal ValuedMammal left a comment

Choose a reason for hiding this comment

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

The code looks good. I ran the esplora tests - all ok.

crates/electrum/src/electrum_ext.rs Outdated Show resolved Hide resolved
crates/esplora/src/async_ext.rs Outdated Show resolved Hide resolved
@notmandatory notmandatory force-pushed the refactor/rename_scan_functions branch 2 times, most recently from 4974d61 to d36db4d Compare January 2, 2024 20:59
Copy link
Contributor

@LLFourn LLFourn left a comment

Choose a reason for hiding this comment

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

ACK d36db4d

Much nicer thanks.

side note: the docs here are stale: d36db4d8df8173d92b9cdeb4fa9877ca77f56d20. There is no argument prev_tip to update_local_chain.

@notmandatory
Copy link
Member Author

side note: the docs here are stale: d36db4d8df8173d92b9cdeb4fa9877ca77f56d20. There is no argument prev_tip to update_local_chain.

fixed!

… to full_scan

removed txids and outpoints params from full_scan
…hains to full_scan

removed txids and outpoints params from full_scan
@notmandatory notmandatory merged commit 9cc0332 into bitcoindevkit:master Jan 6, 2024
12 checks passed
@notmandatory notmandatory mentioned this pull request Jan 6, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

scan_without_keychain and scan's names should be inverted
3 participants