Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
[wallet] fix zapwallettxes interaction with persistent mempool #10330
Conversation
jnewbery
referenced
this pull request
May 3, 2017
Closed
How should -zapwallettxes interact with persistent mempool? #9710
jonasschnelli
added the
Wallet
label
May 4, 2017
|
utACK cfc234b. |
|
rebased |
|
Long-term, I think zapwallettxes should be a function in a standalone wallet tool (#8745). That's probably some time off, and in the mean time this is an improvement in behaviour. Any feedback on concept or implementation welcomed! |
|
utACK 15e72f5 |
MarcoFalke
added this to the
0.15.0
milestone
Jun 20, 2017
|
utACK 15e72f5. I haven't reviewed the test changes. |
|
Let's assume |
Perhaps, although this is an unlikely scenario since:
I'm inclined not to add the warning, but let me know if you feel strongly about it, and I can look at adding it. |
|
rebased |
jnewbery
changed the title from
fix zapwallettxes interaction with persistent mempool to [wallet] fix zapwallettxes interaction with persistent mempool
Jun 30, 2017
|
Needs rebase |
|
rebased |
This was referenced Jul 6, 2017
|
utACK 46d9a4b |
|
utACK 46d9a4b |
TheBlueMatt
reviewed
Jul 14, 2017
Didnt look too closely at the tests, but they look sane. Aside from the strange log message, utACK 46d9a4b
| @@ -4010,6 +4010,11 @@ bool CWallet::ParameterInteraction() | ||
| LogPrintf("%s: parameter interaction: -salvagewallet=1 -> setting -rescan=1\n", __func__); | ||
| } | ||
| + // -zapwallettx implies dropping the mempool on startup | ||
| + if (GetBoolArg("-zapwallettxes", false) && SoftSetBoolArg("-persistmempool", false)) { |
TheBlueMatt
Jul 14, 2017
Contributor
"=<mode>" seems like a super strange string when <mode> isnt replaced out in the logs (plus its a boolean, what does <mode> mean?). zapwallettxes looks like the only one where it looks like this.
jnewbery
Jul 14, 2017
Member
Yes, you're right - that is strange. I just copied the existing log below.
I've fixed them both so they actually print the value of zapwallettxes.
Oh, and surprise! zapwallettxes isn't a bool!
|
Needs rebase. |
|
rebased |
|
utACK 4c3b538 |
|
re-utACK 4c3b538 |
MarcoFalke
added the
Tests
label
Jul 17, 2017
MarcoFalke
merged commit 4c3b538
into
bitcoin:master
Jul 17, 2017
1 check passed
MarcoFalke
added a commit
that referenced
this pull request
Jul 17, 2017
|
|
MarcoFalke |
bf0a08b
|
jnewbery commentedMay 3, 2017
zapwallettxes previously did not interact well with persistent mempool.
zapwallettxes would cause wallet transactions to be zapped, but they
would then be reloaded from the mempool on startup. This commit softsets
persistmempool to false if zapwallettxes is enabled so transactions are
actually zapped.
This PR also fixes the zapwallettxes.py functional test, which did not properly test this feature. The test line:
is not actually testing the presence of the transaction since the RPC is being called incorrectly (with an array instead of a string). The
assert_raises()passes since an assert is raised, but it's not the one the test writer had in mind!Fixes #9710 .