pub enum BroadcastError {
AlreadyKnown,
MissingOrSpentInputs,
InsufficientReplacementFee,
Other(String),
}Expand description
Classified failure modes when broadcasting a transaction package.
The reject reasons covered by the typed variants are stable Bitcoin Core mempool policy
constants (txn-already-known, bad-txns-inputs-missingorspent, insufficient fee, rejecting replacement). Esplora forwards bitcoind’s reject reasons verbatim, so the same matching works
for both backends.
Variants§
AlreadyKnown
The transaction is already in the mempool. Treated as success for retry-safety.
MissingOrSpentInputs
Inputs are missing or already spent — typically a conflicting replacement is in the mempool.
InsufficientReplacementFee
The replacement fee is insufficient under RBF policy.
Other(String)
Any other failure (unrecognized reject reason, RPC/transport error, etc.).
Implementations§
Source§impl BroadcastError
impl BroadcastError
Sourcepub fn is_mempool_conflict(&self) -> bool
pub fn is_mempool_conflict(&self) -> bool
True if the error means the transaction (or an equivalent one) is already known to the network — i.e., not a sign that our transaction is invalid.
Trait Implementations§
Source§impl Clone for BroadcastError
impl Clone for BroadcastError
Source§fn clone(&self) -> BroadcastError
fn clone(&self) -> BroadcastError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BroadcastError
impl Debug for BroadcastError
Source§impl Display for BroadcastError
impl Display for BroadcastError
Source§impl Error for BroadcastError
impl Error for BroadcastError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for BroadcastError
impl PartialEq for BroadcastError
Source§fn eq(&self, other: &BroadcastError) -> bool
fn eq(&self, other: &BroadcastError) -> bool
self and other values to be equal, and is used by ==.impl Eq for BroadcastError
impl StructuralPartialEq for BroadcastError
Auto Trait Implementations§
impl Freeze for BroadcastError
impl RefUnwindSafe for BroadcastError
impl Send for BroadcastError
impl Sync for BroadcastError
impl Unpin for BroadcastError
impl UnsafeUnpin for BroadcastError
impl UnwindSafe for BroadcastError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request