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

Doc improvements #1693

Open
1 of 6 tasks
notmandatory opened this issue Nov 13, 2024 · 1 comment
Open
1 of 6 tasks

Doc improvements #1693

notmandatory opened this issue Nov 13, 2024 · 1 comment
Labels
audit Suggested as result of external code audit documentation Improvements or additions to documentation module-blockchain

Comments

@notmandatory
Copy link
Member

notmandatory commented Nov 13, 2024

bdk_chain

  • CheckPoint's doc comment could mention it's guaranteed to always have at least one element, since it's an invariant relied upon across the project.
  • merge_chains's doc comment is outdated.
  • The doc comment for the rusqlite_impl module is a placeholder: //! Module for stuff.
  • Like walk_ancestors, walk_descendants's doc could mention it excludes the root tx from the iterator.
  • In SpkIterator::next(), derived_descriptor's descriptor is unwrapped because "the descriptor cannot need hardened derivation". It'd be better to have "we check it's never hardened in the constructor" as it's a stronger invariant. (Mentioning as I initially missed it was also checked in SpkIterator::new_with_range() by re-assigning to end the minimum between end and BIP32_MAX_INDEX.)

bdk_esplora

  • Top-level documentation states "A stop_gap of 0 will be treated as a stop_gap of 1" but it's not the case. After making parallel_requests requests in the first iteration of the loop, even if all indexes were detected as active, gap_limit_reached would be set to true if stop_gap is set to 0. Not only would it not be the case if stop_gap was set to 1, but it's also surprising to stop whereas there was no gap.
@notmandatory notmandatory added this to BDK Nov 13, 2024
@notmandatory notmandatory converted this from a draft issue Nov 13, 2024
@notmandatory notmandatory moved this to Todo in BDK Nov 13, 2024
@notmandatory notmandatory added module-blockchain audit Suggested as result of external code audit documentation Improvements or additions to documentation labels Nov 13, 2024
@notmandatory notmandatory changed the title Doc improvements Chain doc improvements Nov 13, 2024
@notmandatory notmandatory changed the title Chain doc improvements Doc improvements Nov 14, 2024
@oleonardolima
Copy link
Contributor

I'd suggest changing this issue to have checkmarks, so we can check the ones already fixed, such as:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit Suggested as result of external code audit documentation Improvements or additions to documentation module-blockchain
Projects
Status: Todo
Development

No branches or pull requests

2 participants