Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

add scanblocks call#317

Draft
chrisguida wants to merge 5 commits into
rust-bitcoin:masterfrom
chrisguida:feat/scanblocks
Draft

add scanblocks call#317
chrisguida wants to merge 5 commits into
rust-bitcoin:masterfrom
chrisguida:feat/scanblocks

Conversation

@chrisguida

Copy link
Copy Markdown

No description provided.

Comment thread json/src/lib.rs
/// Start a scan of the block filter index for an [output descriptor](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md).
pub struct ScanBlocksRequest<'a> {
/// List of descriptors to scan
pub scanobjects: &'a [ScanBlocksRequestDescriptor],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe scanobjects can be a Vec<ScanBlocksRequestDescriptor> (since ScanBlocksRequestDescriptor already owns its descriptor), then we could do away with the lifetime 'a.

Can possibly also derive Default for this whole struct.

@chrisguida chrisguida Jan 27, 2024

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.

Pretty much just copied this from another json array example in the file

pub pubkeys: &'a [PublicKey],

Is this giving you issues and did you test it your way? I seem to remember testing it with a Vec and having issues.

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.

If you want to make a PR into my branch with how you're doing it I'm happy to merge it into my branch

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

no, no issue. I think I tried it both ways.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants