testnet getwork/getmemorypool bug #848

issue gavinandresen opened this issue on February 16, 2012
  1. gavinandresen commented at 2:41 PM on February 16, 2012: contributor

    The changes I made to ensure that at least one block every 20 minutes (or so) is created on testnet makes external miners create lots of invalid blocks.

    The testnet-only change was to drop the difficulty to minimum if it has been 20 minutes or more since generating the last block (as measured by block timestamps). I missed two places in bitcoinrpc.cpp where the block's nTime is updated.

    The fix is easy; after updating pblock->nTime, do:

        if (fTestNet)
            pblock->nBits = GetNextWorkRequired(pindexPrev, pblock);
    
  2. gavinandresen referenced this in commit b3192d7872 on Feb 16, 2012
  3. gavinandresen referenced this in commit 0f8cb5db73 on Feb 16, 2012
  4. sipa commented at 5:26 PM on February 19, 2012: member

    Fixed in #849.

  5. sipa closed this on Feb 19, 2012

  6. sje397 referenced this in commit c946a516fa on Feb 28, 2012
  7. luke-jr referenced this in commit 91aadbdacf on Apr 19, 2012
  8. luke-jr referenced this in commit 27960a36de on Apr 19, 2012
  9. coblee referenced this in commit e78a96e6c9 on Jul 17, 2012
  10. ptschip referenced this in commit cea2e9a2fa on Dec 5, 2017
  11. dexX7 referenced this in commit 8f1eed33a8 on Dec 18, 2018
  12. DrahtBot locked this on Sep 8, 2021
Contributors

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-05-02 15:16 UTC

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