Also for 0.10
Add missing lock in submitblock #6007
pull TheBlueMatt wants to merge 1 commits into bitcoin:master from TheBlueMatt:submitblocklock changing 1 files +14 −9-
TheBlueMatt commented at 5:07 PM on April 13, 2015: member
-
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.
-
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
gmaxwell added this to the milestone 0.10.0 on Apr 13, 2015Fix missing lock in submitblock eb63bf86cfTheBlueMatt force-pushed on Apr 13, 2015gmaxwell commented at 7:42 PM on April 13, 2015: contributorThis looks good to me now. untested ACK.
luke-jr commented at 8:48 PM on April 13, 2015: memberutACK
laanwj commented at 8:39 AM on April 14, 2015: memberutACK
laanwj added the label RPC on Apr 14, 2015laanwj merged this on Apr 14, 2015laanwj closed this on Apr 14, 2015laanwj referenced this in commit d3eb5ae46a on Apr 14, 2015laanwj referenced this in commit eae305f4c4 on Apr 14, 2015laanwj commented at 9:01 AM on April 14, 2015: memberCherry-picked to 0.10 as eae305f
MarcoFalke 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-13 15:15 UTC
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
More mirrored repositories can be found on mirror.b10c.me