Call existsProviderTxConflict after CheckSpecialTx (#2690)
Otherwise we might end up passing and invalid proTx into it, causing assertions to fail and thus crash the process.
This commit is contained in:
parent
7e4257254c
commit
5478183e7e
@ -667,10 +667,6 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
|||||||
if (fRequireStandard && !IsStandardTx(tx, reason))
|
if (fRequireStandard && !IsStandardTx(tx, reason))
|
||||||
return state.DoS(0, false, REJECT_NONSTANDARD, reason);
|
return state.DoS(0, false, REJECT_NONSTANDARD, reason);
|
||||||
|
|
||||||
if (pool.existsProviderTxConflict(tx)) {
|
|
||||||
return state.DoS(0, false, REJECT_DUPLICATE, "protx-dup");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only accept nLockTime-using transactions that can be mined in the next
|
// Only accept nLockTime-using transactions that can be mined in the next
|
||||||
// block; we don't want our mempool filled up with transactions that can't
|
// block; we don't want our mempool filled up with transactions that can't
|
||||||
// be mined yet.
|
// be mined yet.
|
||||||
@ -871,6 +867,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
|||||||
if (!CheckSpecialTx(tx, chainActive.Tip(), state))
|
if (!CheckSpecialTx(tx, chainActive.Tip(), state))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (pool.existsProviderTxConflict(tx)) {
|
||||||
|
return state.DoS(0, false, REJECT_DUPLICATE, "protx-dup");
|
||||||
|
}
|
||||||
|
|
||||||
// If we aren't going to actually accept it but just were verifying it, we are fine already
|
// If we aren't going to actually accept it but just were verifying it, we are fine already
|
||||||
if(fDryRun) return true;
|
if(fDryRun) return true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user