22 for (
const auto &
txin : tx->vin) {
31 "finalized-tx-conflict",
32 strprintf(
"Block %s contains tx %s that conflicts with "
35 tx->GetId().ToString(),
static constexpr bool DEFAULT_AVALANCHE_PRECONSENSUS
Default for -avalanchepreconsensus.
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
std::vector< CTransactionRef > vtx
CBlockIndex * pprev
pointer to the index of the predecessor of this block
bool isAvalancheFinalized(const TxId &txid) const
RecursiveMutex cs
This mutex needs to be locked when accessing mapTx or other members that are guarded by it.
CTransactionRef GetConflictTx(const COutPoint &prevout) const EXCLUSIVE_LOCKS_REQUIRED(cs)
Get the transaction in the pool that spends the same prevout.
const CBlockIndex & m_blockIndex
const CTxMemPool * m_mempool
bool operator()(BlockPolicyValidationState &state) override EXCLUSIVE_LOCKS_REQUIRED(m_mempool -> cs)
bool Invalid(Result result, const std::string &reject_reason="", const std::string &debug_message="")
std::string ToString() const
@ POLICY_VIOLATION
A block policy rule was violated. This block should be parked.
std::shared_ptr< const CTransaction > CTransactionRef
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
#define AssertLockHeld(cs)