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

Wait for wallet to load #4095

Merged
merged 8 commits into from
Dec 12, 2024
Merged

Wait for wallet to load #4095

merged 8 commits into from
Dec 12, 2024

Conversation

raphjaph
Copy link
Collaborator

@raphjaph raphjaph commented Nov 21, 2024

Addresses #4091 and #4111.

@gmart7t2 This catches a couple of errors that usually occur when the wallet takes a long time to load. It should now wait until a wallet or descriptor is finished loading before proceeding.

Do you know by chance what the Bitcoin Core error code or message is if a descriptor for a wallet is still loading?

@raphjaph raphjaph requested a review from casey November 21, 2024 22:44
@1stBitcoinSent
Copy link

Do you know by chance what the Bitcoin Core error code or message is if a descriptor for a wallet is still loading?

I think it's:
error code: -18 error message: Requested wallet does not exist or is not loaded

src/wallet.rs Outdated
.bitcoin_rpc_client(Some(name.clone()))?
.call::<serde_json::Value>("importdescriptors", &[serde_json::to_value(descriptors)?])?;
loop {
match settings
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems wrong, shouldn't we only ever call import descriptors once, as opposed to in a loop?

@casey casey enabled auto-merge (squash) December 12, 2024 00:00
@casey casey merged commit 894c41d into ordinals:master Dec 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants