Merge #10330: [wallet] fix zapwallettxes interaction with persistent mempool
commitbf0a08be281dc42241e7f264c2a20515eb4781bb
authorMarcoFalke <falke.marco@gmail.com>
Mon, 17 Jul 2017 02:23:20 +0000 (17 04:23 +0200)
committerMarcoFalke <falke.marco@gmail.com>
Mon, 17 Jul 2017 02:23:52 +0000 (17 04:23 +0200)
tree87e7f6a61016181a40b7195b25f282305e465647
parent3895e25a77363ae8b49358fb793f50fa8b271e2d
parent4c3b538c61532dc68d79bbe34729759a13b73f0c
Merge #10330: [wallet] fix zapwallettxes interaction with persistent mempool

4c3b538 [logs] fix zapwallettxes startup logs (John Newbery)
e7a2181 [wallet] fix zapwallettxes interaction with persistent mempool (John Newbery)
ff7365e [tests] fix flake8 warnings in zapwallettxes.py (John Newbery)

Pull request description:

  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:

  ```py
       assert_raises(JSONRPCException, self.nodes[0].gettransaction, [txid3])
       #there must be a expection because the unconfirmed wallettx0 must be gone by now
  ```
  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 .

Tree-SHA512: e3236efc7a2fd2b3bf1d9e2e8a7726d470c57f5d95cf41b7bde264edc8817bd36a6f3feff52f8de8db0ef64b7247c88b24e7ff7cefaa706cba86fe4e2135a508
src/wallet/wallet.cpp