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

add rescan bool to importprivkey to control whether to do a rescan after import #2080

Merged
merged 1 commit into from
Dec 12, 2012

Conversation

mcassano
Copy link
Contributor

@mcassano mcassano commented Dec 6, 2012

I use a lot of vanity addresses and I don't need to rescan the chain when importing. I like the ability to optionally request not to do a rescan. Attached is a working example of this.

pwalletMain->ScanForWalletTransactions(pindexGenesisBlock, true);
pwalletMain->ReacceptWalletTransactions();

if (fRescan) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: our coding style is:
4 space indenting, no tabs

(see doc/coding.txt)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My mistake, fixed now.

@Diapolo
Copy link

Diapolo commented Dec 6, 2012

Now you just need to merge your 2 commits into one.

pwalletMain->ReacceptWalletTransactions();
if (fRescan) {
pwalletMain->ScanForWalletTransactions(pindexGenesisBlock, true);
Copy link

Choose a reason for hiding this comment

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

And this are still only 2 spaces (same above and below).

@mcassano
Copy link
Contributor Author

mcassano commented Dec 6, 2012

Thank you for the feedback, I just rebased so I think it's just one commit now with proper spacing.

@sipa
Copy link
Member

sipa commented Dec 6, 2012

Now fix the commit message, and you're golden. ACK on the code change.

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/331bc98a7fb0aa5bee965faa8cf1a58868d28558 for binaries and test log.

@mcassano
Copy link
Contributor Author

mcassano commented Dec 7, 2012

I removed the mention of the tabs and spaces from the commit, I assume that is what was wrong with the message. Thanks for the ACK.

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/44051af1a87a5fb8f4e88442c0eb64a1b4ecf2e6 for binaries and test log.

gavinandresen added a commit that referenced this pull request Dec 12, 2012
add rescan bool to importprivkey to control whether to do a rescan after import
@gavinandresen gavinandresen merged commit 51dc438 into bitcoin:master Dec 12, 2012
@mcassano mcassano deleted the importprivkey_rescan_false branch February 18, 2013 16:43
laudney pushed a commit to reddcoin-project/reddcoin-3.10 that referenced this pull request Mar 19, 2014
add rescan bool to importprivkey to control whether to do a rescan after import
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants