Fixes for obscure mempool-checkpoint interaction #2056

pull sipa wants to merge 2 commits into bitcoin:master from sipa:fix_2052 changing 1 files +5 −3
  1. sipa commented at 11:45 PM on November 30, 2012: member

    Implements the suggestions listed in #2052:

    • Only move disconnected transactions to the mempool after the last checkpoint
    • Always very scripts of transactions that do
  2. Enable script verification for reorganized mempool tx 038784b979
  3. BitcoinPullTester commented at 11:59 PM on November 30, 2012: none

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

  4. in src/main.cpp:None in cb1e827f6d outdated
    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())
    


    gavinandresen commented at 12:02 AM on December 1, 2012:

    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)


    sipa commented at 12:03 AM on December 1, 2012:

    @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.

  5. Only send reorged txn to mempool after checkpoint 8259c57321
  6. sipa commented at 1:12 AM on December 1, 2012: member

    @gavinandresen Updated.

  7. BitcoinPullTester commented at 1:30 AM on December 1, 2012: none

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

  8. gavinandresen commented at 2:49 AM on December 1, 2012: contributor

    ACK

  9. Diapolo commented at 8:42 PM on December 4, 2012: none

    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.

  10. jgarzik commented at 10:10 PM on December 5, 2012: contributor

    ACK

  11. sipa referenced this in commit cd1391ae4d on Dec 5, 2012
  12. sipa merged this on Dec 5, 2012
  13. sipa closed this on Dec 5, 2012

  14. sipa deleted the branch on May 3, 2013
  15. laudney referenced this in commit 71fbe178ad on Mar 19, 2014
  16. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 00:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me