Skip CheckCbTxMerkleRoots until assumeValid block (#2890)
This commit is contained in:
parent
4dee7c4a25
commit
783cb9ca69
@ -86,7 +86,7 @@ bool UndoSpecialTx(const CTransaction& tx, const CBlockIndex* pindex)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ProcessSpecialTxsInBlock(const CBlock& block, const CBlockIndex* pindex, CValidationState& state, bool fJustCheck)
|
||||
bool ProcessSpecialTxsInBlock(const CBlock& block, const CBlockIndex* pindex, CValidationState& state, bool fJustCheck, bool fCheckCbTxMerleRoots)
|
||||
{
|
||||
static int64_t nTimeLoop = 0;
|
||||
static int64_t nTimeQuorum = 0;
|
||||
@ -122,7 +122,7 @@ bool ProcessSpecialTxsInBlock(const CBlock& block, const CBlockIndex* pindex, CV
|
||||
int64_t nTime4 = GetTimeMicros(); nTimeDMN += nTime4 - nTime3;
|
||||
LogPrint("bench", " - deterministicMNManager: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime3), nTimeDMN * 0.000001);
|
||||
|
||||
if (!CheckCbTxMerkleRoots(block, pindex, state)) {
|
||||
if (fCheckCbTxMerleRoots && !CheckCbTxMerkleRoots(block, pindex, state)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ class CBlockIndex;
|
||||
class CValidationState;
|
||||
|
||||
bool CheckSpecialTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state);
|
||||
bool ProcessSpecialTxsInBlock(const CBlock& block, const CBlockIndex* pindex, CValidationState& state, bool fJustCheck);
|
||||
bool ProcessSpecialTxsInBlock(const CBlock& block, const CBlockIndex* pindex, CValidationState& state, bool fJustCheck, bool fCheckCbTxMerleRoots);
|
||||
bool UndoSpecialTxsInBlock(const CBlock& block, const CBlockIndex* pindex);
|
||||
|
||||
template <typename T>
|
||||
|
@ -2259,7 +2259,7 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd
|
||||
int64_t nTime5_4 = GetTimeMicros(); nTimePayeeValid += nTime5_4 - nTime5_3;
|
||||
LogPrint("bench", " - IsBlockPayeeValid: %.2fms [%.2fs]\n", 0.001 * (nTime5_4 - nTime5_3), nTimePayeeValid * 0.000001);
|
||||
|
||||
if (!ProcessSpecialTxsInBlock(block, pindex, state, fJustCheck)) {
|
||||
if (!ProcessSpecialTxsInBlock(block, pindex, state, fJustCheck, fScriptChecks)) {
|
||||
return error("ConnectBlock(DASH): ProcessSpecialTxsInBlock for block %s failed with %s",
|
||||
pindex->GetBlockHash().ToString(), FormatStateMessage(state));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user