Created
June 27, 2018 03:43
-
-
Save bitPico/904352bd356baff866093de57c8caa23 to your computer and use it in GitHub Desktop.
Bitcoin ABC Large Block ZeroDay Vulnerability - 01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static bool ConnectBlock(const Config &config, const CBlock &block, | |
CValidationState &state, CBlockIndex *pindex, | |
CCoinsViewCache &view, bool fJustCheck = false) { | |
==> AssertLockHeld(cs_main); | |
// ... | |
==> if (!control.Wait()) { | |
return state.DoS(100, false, REJECT_INVALID, "blk-bad-inputs", false, | |
"parallel script check failed"); | |
} | |
bool SendMessages(const Config &config, CNode *pto, CConnman &connman, | |
const std::atomic<bool> &interruptMsgProc) { | |
// .... | |
==> TRY_LOCK(cs_main, lockMain); | |
if (!lockMain) { | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Multi threading 101: get & hold lock, do stuff, release lock. Seems that's not how Bcash understood this.