pub enum TxValidationResult {
TX_RESULT_UNSET,
TX_CONSENSUS,
TX_RECENT_CONSENSUS_CHANGE,
TX_INPUTS_NOT_STANDARD,
TX_NOT_STANDARD,
TX_MISSING_INPUTS,
TX_PREMATURE_SPEND,
TX_WITNESS_MUTATED,
TX_WITNESS_STRIPPED,
TX_CONFLICT,
TX_MEMPOOL_POLICY,
}Expand description
| A “reason” why a transaction was invalid, | suitable for determining whether the | provider of the transaction should | be banned/ignored/disconnected/etc. |
Variants§
TX_RESULT_UNSET
| initial value. Tx has not yet been rejected |
TX_CONSENSUS
| invalid by consensus rules |
TX_RECENT_CONSENSUS_CHANGE
| Invalid by a change to consensus rules | more recent than SegWit. | | Currently unused as there are no such | consensus rule changes, and any download | sources realistically need to support | SegWit in order to provide useful data, | so differentiating between always-invalid | and invalid-by-pre-SegWit-soft-fork | is uninteresting. |
TX_INPUTS_NOT_STANDARD
| inputs (covered by txid) failed policy | rules |
TX_NOT_STANDARD
| otherwise didn’t meet our local policy | rules |
TX_MISSING_INPUTS
| transaction was missing some of its | inputs |
TX_PREMATURE_SPEND
| transaction spends a coinbase too early, | or violates locktime/sequence locks |
TX_WITNESS_MUTATED
| Transaction might have a witness prior | to SegWit activation, or witness may | have been malleated (which includes | non-standard witnesses). |
TX_WITNESS_STRIPPED
| Transaction is missing a witness. |
TX_CONFLICT
| Tx already in mempool or conflicts with | a tx in the chain (if it conflicts with | another tx in mempool, we use MEMPOOL_POLICY | as it failed to reach the RBF threshold) | | Currently this is only used if the transaction | already exists in the mempool or on chain. |
TX_MEMPOOL_POLICY
| violated mempool’s fee/size/descendant/RBF/etc | limits |
Trait Implementations§
source§impl Clone for TxValidationResult
impl Clone for TxValidationResult
source§fn clone(&self) -> TxValidationResult
fn clone(&self) -> TxValidationResult
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for TxValidationResult
impl Debug for TxValidationResult
source§impl PartialEq<TxValidationResult> for TxValidationResult
impl PartialEq<TxValidationResult> for TxValidationResult
source§fn eq(&self, other: &TxValidationResult) -> bool
fn eq(&self, other: &TxValidationResult) -> bool
self and other values to be equal, and is used
by ==.impl Eq for TxValidationResult
impl StructuralEq for TxValidationResult
impl StructuralPartialEq for TxValidationResult
Auto Trait Implementations§
impl RefUnwindSafe for TxValidationResult
impl Send for TxValidationResult
impl Sync for TxValidationResult
impl Unpin for TxValidationResult
impl UnwindSafe for TxValidationResult
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.