pub enum Reject {
LowFeeRate(FeeRate, u64, u64),
ExceededMaximumAncestorsCount,
ExceededTransactionSizeLimit(u64, u64),
Full(String),
Duplicated(Byte32),
Malformed(String),
DeclaredWrongCycles(Cycle, Cycle),
Resolve(OutPointError),
Verification(Error),
Expiry(u64),
}
Expand description
TX reject message
Variants§
LowFeeRate(FeeRate, u64, u64)
Transaction fee lower than config
ExceededMaximumAncestorsCount
Transaction exceeded maximum ancestors count limit
ExceededTransactionSizeLimit(u64, u64)
Transaction exceeded maximum size limit
Full(String)
Transaction are replaced because the pool is full
Duplicated(Byte32)
Transaction already exist in transaction_pool
Malformed(String)
Malformed transaction
DeclaredWrongCycles(Cycle, Cycle)
Declared wrong cycles
Resolve(OutPointError)
Resolve failed
Verification(Error)
Verification failed
Expiry(u64)
Expired
Implementations§
source§impl Reject
impl Reject
sourcepub fn is_malformed_tx(&self) -> bool
pub fn is_malformed_tx(&self) -> bool
Returns true if the reject reason is malformed tx.
sourcepub fn is_allowed_relay(&self) -> bool
pub fn is_allowed_relay(&self) -> bool
Returns true if tx can be resubmitted, allowing relay
- Declared wrong cycles should allow relay with the correct cycles
- Reject but is not malformed and the fee rate reached the threshold, it may be due to double spending or temporary limitations of the pool resources, and expired clearing
Trait Implementations§
source§impl Error for Reject
impl Error for Reject
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for Reject
impl Send for Reject
impl Sync for Reject
impl Unpin for Reject
impl !UnwindSafe for Reject
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more