|
|
@ -427,8 +427,9 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
|
|
|
return state.DoS(0, false, REJECT_NONSTANDARD, "non-final");
|
|
|
|
return state.DoS(0, false, REJECT_NONSTANDARD, "non-final");
|
|
|
|
|
|
|
|
|
|
|
|
// is it already in the memory pool?
|
|
|
|
// is it already in the memory pool?
|
|
|
|
if (pool.exists(hash))
|
|
|
|
if (pool.exists(hash)) {
|
|
|
|
return state.Invalid(false, REJECT_ALREADY_KNOWN, "txn-already-in-mempool");
|
|
|
|
return state.Invalid(false, REJECT_DUPLICATE, "txn-already-in-mempool");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Check for conflicts with in-memory transactions
|
|
|
|
// Check for conflicts with in-memory transactions
|
|
|
|
std::set<uint256> setConflicts;
|
|
|
|
std::set<uint256> setConflicts;
|
|
|
@ -466,8 +467,9 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (fReplacementOptOut)
|
|
|
|
if (fReplacementOptOut) {
|
|
|
|
return state.Invalid(false, REJECT_CONFLICT, "txn-mempool-conflict");
|
|
|
|
return state.Invalid(false, REJECT_DUPLICATE, "txn-mempool-conflict");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setConflicts.insert(ptxConflicting->GetHash());
|
|
|
|
setConflicts.insert(ptxConflicting->GetHash());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -494,7 +496,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
|
|
|
if (!had_coin_in_cache) {
|
|
|
|
if (!had_coin_in_cache) {
|
|
|
|
coins_to_uncache.push_back(outpoint);
|
|
|
|
coins_to_uncache.push_back(outpoint);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return state.Invalid(false, REJECT_ALREADY_KNOWN, "txn-already-known");
|
|
|
|
return state.Invalid(false, REJECT_DUPLICATE, "txn-already-known");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|