[#MempoolAcceptResult] = MempoolAcceptResult :mrdocs: Validation result for a transaction evaluated by MemPoolAccept (single or package). Here are the expected fields and properties of a result depending on its ResultType, applicable to results returned from package evaluation:+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+| Field or property | VALID | INVALID | MEMPOOL_ENTRY | DIFFERENT_WITNESS || | |‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐| | || | | TX_RECONSIDERABLE | Other | | |+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+| txid in mempool? | yes | no | no* | yes | yes || wtxid in mempool? | yes | no | no* | yes | no || m_state | yes, IsValid() | yes, IsInvalid() | yes, IsInvalid() | yes, IsValid() | yes, IsValid() || m_vsize | yes | no | no | yes | no || m_base_fees | yes | no | no | yes | no || m_effective_feerate | yes | yes | no | no | no || m_wtxids_fee_calculations | yes | yes | no | no | no || m_other_wtxid | no | no | no | no | yes |+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+ (*) Individual transaction acceptance doesn't return MEMPOOL_ENTRY and DIFFERENT_WITNESS. It returns INVALID, with the errors txn‐already‐in‐mempool and txn‐same‐nonwitness‐data‐in‐mempool respectively. In those cases, the txid or wtxid may be in the mempool for a TX_CONFLICT. == Synopsis Declared in `<validation.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct MempoolAcceptResult; ---- == Enums [cols="1,4"] |=== | Name| Description | xref:MempoolAcceptResult/ResultType.adoc[`ResultType`] | Used to indicate the results of mempool validation. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:MempoolAcceptResult/Failure.adoc[`Failure`] | Build a result for a transaction that failed validation. | xref:MempoolAcceptResult/FeeFailure.adoc[`FeeFailure`] | Build a result for a fee‐related validation failure. | xref:MempoolAcceptResult/MempoolTx.adoc[`MempoolTx`] | Build a result for a transaction that was already present in the mempool. | xref:MempoolAcceptResult/MempoolTxDifferentWitness.adoc[`MempoolTxDifferentWitness`] | Build a result for a transaction rejected because a same‐txid, different‐witness transaction is already in the mempool. | xref:MempoolAcceptResult/Success.adoc[`Success`] | Build a result for a transaction that was successfully accepted into the mempool. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:MempoolAcceptResult/m_base_fees.adoc[`m_base_fees`] | Raw base fees in satoshis. | xref:MempoolAcceptResult/m_effective_feerate.adoc[`m_effective_feerate`] | The feerate at which this transaction was considered. This includes any fee delta added using prioritisetransaction (i.e. modified fees). If this transaction was submitted as a package, this is the package feerate, which may also include its descendants and/or ancestors (see m_wtxids_fee_calculations below). | xref:MempoolAcceptResult/m_other_wtxid.adoc[`m_other_wtxid`] | The wtxid of the transaction in the mempool which has the same txid but different witness. | xref:MempoolAcceptResult/m_replaced_transactions.adoc[`m_replaced_transactions`] | Mempool transactions replaced by the tx. | xref:MempoolAcceptResult/m_result_type.adoc[`m_result_type`] | Result type. Present in all MempoolAcceptResults. | xref:MempoolAcceptResult/m_state.adoc[`m_state`] | Contains information about why the transaction failed. | xref:MempoolAcceptResult/m_vsize.adoc[`m_vsize`] | Virtual size as used by the mempool, calculated using serialized size and sigops. | xref:MempoolAcceptResult/m_wtxids_fee_calculations.adoc[`m_wtxids_fee_calculations`] | Contains the wtxids of the transactions used for fee‐related checks. Includes this transaction's wtxid and may include others if this transaction was validated as part of a package. This is not necessarily equivalent to the list of transactions passed to ProcessNewPackage(). Only present when m_result_type = ResultType::VALID. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:AcceptToMemoryPool.adoc[`AcceptToMemoryPool`] | Try to add a transaction to the mempool. This is an internal function and is exposed only for testing. Client code should use ChainstateManager::ProcessTransaction() |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#