LearnBitcoin

Bitcoin Dev Archive 2012

Wallet related bug?

1 message, 22 Jun 2012. Started by grarpamp.

grarpamp

Permalink Original thread on gnusha.org

grarpamp permalink original

I think there may be an ideal order of ops bug around rescan, wallet upgrades/import and last block markers.

I dropped an old wallet in a current blockchain.

First ran - in rescan mode. It said old walletver. Then rescanned whole chain. AddToWallet some blockhash, blocks out of range, invalid/nonwallet txid's, which were already in there as legit ones in the old logs.

Second run in plain mode. New wallet ver logged. Rescanned the last 20k blocks or so, which might have been the marker last time the old wallet was used.

Third and later runs... duplicates the second.

Never did say 'upgrading wallet' as it sometimes does.

Running detach=1 always.

Why scan the last 20k every time? Shouldn't have to if whole chain was scanned. And certainly no more than once if not.

Also... Dumping the run params (bitcoin.conf, cmdline) to the log would be good.

And not automatically truncate the log when big but just append or roll it.