23 for (
const auto &txin : tx->vin) {
28 if (ptxConflicting && ptxConflicting->GetId() != tx->GetId() &&
30 ptxConflicting->GetId())) {
33 "finalized-tx-conflict",
34 strprintf(
"Block %s contains tx %s that conflicts with "
37 tx->GetId().ToString(),
38 ptxConflicting->GetId().ToString()));
std::vector< CTransactionRef > vtx
CBlockIndex * pprev
pointer to the index of the predecessor of this block
RecursiveMutex cs
This mutex needs to be locked when accessing mapTx or other members that are guarded by it.
bool setAvalancheFinalized(const CTxMemPoolEntryRef &tx, const Consensus::Params ¶ms, const CBlockIndex &active_chain_tip, std::vector< TxId > &finalizedTxIds) EXCLUSIVE_LOCKS_REQUIRED(bool isAvalancheFinalizedPreConsensus(const TxId &txid) const EXCLUSIVE_LOCKS_REQUIRED(cs)
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)
const avalanche::Processor & m_avalanche
bool Invalid(Result result, const std::string &reject_reason="", const std::string &debug_message="")
bool isPreconsensusActivated(const CBlockIndex *pprev) const
std::string ToString() const
@ POLICY_VIOLATION
A block policy rule was violated. This block should be parked.
std::shared_ptr< const CTransaction > CTransactionRef