Implements the suggestions listed in #2052:
- Only move disconnected transactions to the mempool after the last checkpoint
- Always very scripts of transactions that do
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/cb1e827f6d558b7cb311bc73e1bbdb770c468776 for binaries and test log.
1705 | @@ -1706,7 +1706,7 @@ bool SetBestChain(CBlockIndex* pindexNew) 1706 | 1707 | // Queue memory transactions to resurrect 1708 | BOOST_FOREACH(const CTransaction& tx, block.vtx) 1709 | - if (!tx.IsCoinBase()) 1710 | + if (!tx.IsCoinBase() && pindex->nHeight > Checkpoints::GetTotalBlocksEstimate())
ACK if you add a comment something like: // height will be < checkpoint only when reading an old blockchain via -loadblock or -reindex // (skip re-org'ed transactions in those cases)
@gavinandresen During normal IBD it will be < checkpoint too. As a follow-up, we should probably disable accepting things to the mempool during IBD altogether...
EDIT: right, but you shouldn't be receiving side chains when doing normal network IBD. Nothing prevents a peer from sending one nonetheless though.
@gavinandresen Updated.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/8259c573212213e3cd8da7146af525e067c4ddaa for binaries and test log.
ACK
I've been using this for a while and did not observe strange things. But my observations (as always) should be considered just entry-level in terms of client-usage-and-test-scenarios ^^, sorry :D.
ACK