From c975a986b2c6e12439571006093023e14a4f8cce Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 14 Nov 2018 00:17:16 +0300 Subject: [PATCH] no cs_main in specialtxes --- src/evo/cbtx.cpp | 5 ----- src/evo/providertx.cpp | 8 -------- src/evo/specialtx.cpp | 2 -- 3 files changed, 15 deletions(-) diff --git a/src/evo/cbtx.cpp b/src/evo/cbtx.cpp index 2eef16fa4..711aabb40 100644 --- a/src/evo/cbtx.cpp +++ b/src/evo/cbtx.cpp @@ -12,8 +12,6 @@ bool CheckCbTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state) { - AssertLockHeld(cs_main); - if (!tx.IsCoinBase()) { return state.DoS(100, false, REJECT_INVALID, "bad-cbtx-invalid"); } @@ -37,8 +35,6 @@ bool CheckCbTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidatio // This can only be done after the block has been fully processed, as otherwise we won't have the finished MN list bool CheckCbTxMerkleRootMNList(const CBlock& block, const CBlockIndex* pindex, CValidationState& state) { - AssertLockHeld(cs_main); - if (block.vtx[0]->nType != TRANSACTION_COINBASE) { return true; } @@ -63,7 +59,6 @@ bool CheckCbTxMerkleRootMNList(const CBlock& block, const CBlockIndex* pindex, C bool CalcCbTxMerkleRootMNList(const CBlock& block, const CBlockIndex* pindexPrev, uint256& merkleRootRet, CValidationState& state) { - AssertLockHeld(cs_main); LOCK(deterministicMNManager->cs); CDeterministicMNList tmpMNList; diff --git a/src/evo/providertx.cpp b/src/evo/providertx.cpp index 5e32efb01..dbae4eb56 100644 --- a/src/evo/providertx.cpp +++ b/src/evo/providertx.cpp @@ -76,8 +76,6 @@ static bool CheckInputsHash(const CTransaction& tx, const ProTx& proTx, CValidat bool CheckProRegTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state) { - AssertLockHeld(cs_main); - CProRegTx ptx; if (!GetTxPayload(tx, ptx)) { return state.DoS(100, false, REJECT_INVALID, "bad-protx-payload"); @@ -203,8 +201,6 @@ bool CheckProRegTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValid bool CheckProUpServTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state) { - AssertLockHeld(cs_main); - CProUpServTx ptx; if (!GetTxPayload(tx, ptx)) { return state.DoS(100, false, REJECT_INVALID, "bad-protx-payload"); @@ -255,8 +251,6 @@ bool CheckProUpServTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CVa bool CheckProUpRegTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state) { - AssertLockHeld(cs_main); - CProUpRegTx ptx; if (!GetTxPayload(tx, ptx)) { return state.DoS(100, false, REJECT_INVALID, "bad-protx-payload"); @@ -331,8 +325,6 @@ bool CheckProUpRegTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CVal bool CheckProUpRevTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state) { - AssertLockHeld(cs_main); - CProUpRevTx ptx; if (!GetTxPayload(tx, ptx)) { return state.DoS(100, false, REJECT_INVALID, "bad-protx-payload"); diff --git a/src/evo/specialtx.cpp b/src/evo/specialtx.cpp index 56e6474a7..6352b6e66 100644 --- a/src/evo/specialtx.cpp +++ b/src/evo/specialtx.cpp @@ -16,8 +16,6 @@ bool CheckSpecialTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state) { - AssertLockHeld(cs_main); - if (tx.nVersion < 3 || tx.nType == TRANSACTION_NORMAL) return true;