ordinals / ord

👁‍🗨 Rare and exotic sats
https://ordinals.com
Creative Commons Zero v1.0 Universal
3.86k stars 1.38k forks source link

Display mnemonic on `ord wallet create` even if import descriptors times out #4091

Open casey opened 5 days ago

casey commented 5 days ago

Reported by @gmart7t2 here:

@raphjaph it used to be that if there was a timeout while rescanning, the seed phrase wouldn't be displayed (I'm think more about "wallet create" I guess). Is that still the case?

In case this isn't clear:

When I create a new ord wallet, ord imports new descriptors, bitcoind rescans the last 2 hours of blocks, which might cause an RPC timeout, which aborts the ord command and prevents the JSON result (which contains the new seed phrase) from being displayed.

If bitcoind times out, the descriptors can be imported, but we'll never have printed out the mnemonic. We should fix this somehow. I think we should print the same output to standard out, but also return an error code and print an error message to stderr.