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

Allow manual rescan #250

Closed
arnuschky opened this issue Apr 18, 2015 · 5 comments
Closed

Allow manual rescan #250

arnuschky opened this issue Apr 18, 2015 · 5 comments

Comments

@arnuschky
Copy link

btcwallet is currently missing a way to manually trigger a full rescan of the wallet (similar to bitcoin core's --rescan command line parameter).

A full rescan of all addresses at once might be simplest, but feature-wise a RPC call that allows to select addresses to rescan and optionally accepts a starting height would be great.

@jrick
Copy link
Member

jrick commented Apr 18, 2015

On master (which uses the old txstore package) this can be triggered by closing wallet, deleting the file ~/.btcwallet/{main,test,sim}net/tx.bin, and restarting. Once #234 lands and transaction history is recorded in the same database as keys, another tool (dropwtxmgr) in the cmd directory will need to be used.

I'm hesitant to add non-hacky ways to do this for all addresses from the wallet, since the rescan is likely necessary because of another bug which should be fixed instead. Rescanning for individual addresses is better, but if it's just imported addresses from batch imports that need rescanning, than a batch import should be added, or delay the rescan of all imported addresses until all of them have been imported.

@arnuschky
Copy link
Author

Thanks for the workaround.

Regarding bulk import, I agree. Regarding individual address rescan, once you use a tool for deleting from the common database, wouldn't it be easy to remove the transactions of an individual address?

@jrick
Copy link
Member

jrick commented Apr 18, 2015

When would you need individual address rescan for a non-imported address?

@arnuschky
Copy link
Author

Err, good point - especially if the overhead of rescanning all addresses at once is low. (We're coming from bitcoin core, where rescan is so slow that we cooked up all kinds of techniques to speed it up...)

@arnuschky
Copy link
Author

For the record: #234 has been merged, thus deleting tx.bin does not trigger a rescan anymore.

Instead, use dropwtxmgr --db=/path/to/btcwallet/testnet/wallet.db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants