Add missing lock in submitblock #6007

pull TheBlueMatt wants to merge 1 commits into bitcoin:master from TheBlueMatt:submitblocklock changing 1 files +14 −9
  1. TheBlueMatt commented at 5:07 PM on April 13, 2015: member

    Also for 0.10

  2. TheBlueMatt commented at 5:09 PM on April 13, 2015: member

    This just fixes the bug, it would be nice to use threadsafetey.h annotations, but I believe that requires build-system changes as well.

  3. in src/rpcmining.cpp:None in 09834ee14a outdated
     635 | -        if (pindex->IsValid(BLOCK_VALID_SCRIPTS))
     636 | -            return "duplicate";
     637 | -        if (pindex->nStatus & BLOCK_FAILED_MASK)
     638 | -            return "duplicate-invalid";
     639 | -        // Otherwise, we might only have the header - process the block before returning
     640 | +    bool fBlockPresent;
    


    jtimon commented at 5:43 PM on April 13, 2015:

    Little nit: wouldn't be better to explicitly initialize this to false here ?


    TheBlueMatt commented at 6:30 PM on April 13, 2015:

    ehhh, lol yea

  4. gmaxwell added this to the milestone 0.10.0 on Apr 13, 2015
  5. Fix missing lock in submitblock eb63bf86cf
  6. TheBlueMatt force-pushed on Apr 13, 2015
  7. gmaxwell commented at 7:42 PM on April 13, 2015: contributor

    This looks good to me now. untested ACK.

  8. luke-jr commented at 8:48 PM on April 13, 2015: member

    utACK

  9. laanwj commented at 8:39 AM on April 14, 2015: member

    utACK

  10. laanwj added the label RPC on Apr 14, 2015
  11. laanwj merged this on Apr 14, 2015
  12. laanwj closed this on Apr 14, 2015

  13. laanwj referenced this in commit d3eb5ae46a on Apr 14, 2015
  14. laanwj referenced this in commit eae305f4c4 on Apr 14, 2015
  15. laanwj commented at 9:01 AM on April 14, 2015: member

    Cherry-picked to 0.10 as eae305f

  16. MarcoFalke locked this on Sep 8, 2021

Milestone
0.10.0


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-13 15:15 UTC

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