upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
authorBitflash <btf01@proton.me>2026-08-02 14:03:55 -0300
committerGitHub <noreply@github.com>2026-08-02 14:03:55 -0300
commit67271dda37e4b9764c59059caa2c8268f755d6e5 (patch)
tree1b95c12f5ab6558243833a43f1ef52ad8580d7a0 /src/script.cpp
parent00c2d6af83c553df90e5950cf68552752b7ae6e7 (diff)
wallet: one quiet batch is not far enough to stop a restore (#115)
Restoring from a phrase gave up after the first batch of a hundred addresses that turned up nothing, and the wallet digs a wider gap than that by itself: a restore leaves nHDNext at the depth it scanned, the key pool derives KEYPOOL_SIZE more, and change takes the index after those. Measured on a real wallet with real coin -- restore, spend once, and the outputs land at indices 201 and 302; restoring again found only the first transaction and reported the spend as gone. With -restoredepth=500 the same wallet found both, which is what said this was reach and not loss. Three quiet batches instead of one: 2 transaction(s) across 601 derived addresses on the same wallet, chain and phrase. Worse after #109, not before it: change used to return to an input's key, a low index the scan had already passed. Making change recoverable moved it out to where the scan stopped looking. Does not fix the gap growing with every restore -- pulling nHDNext back to the last used index is the structural answer and needs its own testing.
Diffstat (limited to 'src/script.cpp')
0 files changed, 0 insertions, 0 deletions