the `zapwallettxes.py` qa test is currently broken due to a syntax error:

```python
     assert_raises(JSONRPCException, self.nodes[0].gettransaction, [txid3])
     #there must be a expection because the unconfirmed wallettx0 must be gone by now
```

This doesn't actually test that the transaction is not in the wallet, because `gettransaction()` is being called incorrectly (with an array instead of a string).

Changing the test to `assert_raises(JSONRPCException, self.nodes[0].gettransaction, txid3)` causes the rpc to succeed and the test script to fail because `txid3` is still in the wallet.

This is because the mempool is now persistent and is saved to disk when bitcoind shuts down. zapwallettxes removes the unconfirmed transaction from the wallet but bitcoind will rescan the mempool.dat file on startup and add the unconfirmed transaction back into the wallet.

I've 'fixed' zapwallettxes.py in https://github.com/jnewbery/bitcoin/tree/zapwallettxes , but the question remains: how *should* -zapwallettxes interact with persistent mempool? The use case for zapwallettxes is explained here: https://github.com/bitcoin/bitcoin/pull/3659#issuecomment-34878999 . My view is that even with zapwallettxes, bitcoind should rescan the mempool, but there should be better documentation or a warning that unconfirmed transaction in your mempool will be re-added to the wallet even if zapwallettxes is used. If you really want to remove all unconfirmed transactions from your wallet, you can delete your mempool.dat file and then restart with zapwallettxes.
class CValidationInterface;
class CValidationState;
struct ChainTxData;
struct PrecomputedTransactionData;
struct LockPoints;
static const bool DEFAULT_WHITELISTRELAY = true;
static const bool DEFAULT_WHITELISTFORCERELAY = true;
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000;
static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN;
static const CAmount HIGH_TX_FEE_PER_KB = 0.01 * COIN;
static const CAmount HIGH_MAX_TX_FEE = 100 * HIGH_TX_FEE_PER_KB;
static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25;
static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101;
static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25;
static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101;
static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 336;
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; 
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; 
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; 
static const int MAX_SCRIPTCHECK_THREADS = 16;
static const int DEFAULT_SCRIPTCHECK_THREADS = 0;
static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 16;
static const unsigned int BLOCK_STALLING_TIMEOUT = 2;
/** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends
 *  less than this number, we reached its tip. Changing this value is a protocol upgrade. */
static const unsigned int MAX_HEADERS_RESULTS = 2000;
/** Maximum depth of blocks we're willing to serve as compact blocks to peers
 *  when requested. For older blocks, a regular BLOCK response will be sent. */
static const int MAX_CMPCTBLOCK_DEPTH = 5;
static const int MAX_BLOCKTXN_DEPTH = 10;