diff --git a/packages/rs-platform-wallet/src/broadcaster.rs b/packages/rs-platform-wallet/src/broadcaster.rs index 633af12ae25..c9e5f4cd593 100644 --- a/packages/rs-platform-wallet/src/broadcaster.rs +++ b/packages/rs-platform-wallet/src/broadcaster.rs @@ -124,13 +124,6 @@ impl TransactionBroadcaster for DapiBroadcaster { } } -/// How long the SPV broadcast waits for a network-acceptance verdict before -/// reporting the outcome as unknown. Shorter than dash-spv's own default so a -/// user-facing send does not hang for a full minute. On live Dash networks -/// acceptance usually resolves in seconds via the InstantSend lock or the -/// withheld-peer echo, well inside this bound. -const SPV_ACCEPTANCE_TIMEOUT: Duration = Duration::from_secs(30); - /// The SPV broadcast channel: send through P2P peers and await dash-spv's /// network-acceptance verdict (rust-dashcore#913). #[async_trait] @@ -188,11 +181,7 @@ impl SpvBroadcaster { impl TransactionBroadcaster for SpvBroadcaster { async fn broadcast(&self, transaction: &Transaction) -> Result { let txid = transaction.txid(); - match self - .spv - .broadcast_and_wait(transaction, Some(SPV_ACCEPTANCE_TIMEOUT)) - .await - { + match self.spv.broadcast_and_wait(transaction, None).await { Ok(BroadcastResult::Accepted { relayed_by }) => { tracing::info!( txid = %txid, @@ -208,9 +197,9 @@ impl TransactionBroadcaster for SpvBroadcaster { // later echo/IS-lock/confirmation or the reservation-TTL // backstop reconciles the reservation. Ok(BroadcastResult::Uncertain) => Err(BroadcastError::MaybeSent { - reason: format!( - "SPV broadcast saw no acceptance signal within {SPV_ACCEPTANCE_TIMEOUT:?}" - ), + reason: + "SPV broadcast saw no acceptance signal before dash-spv's acceptance timeout" + .to_string(), }), // Provably never sent (per the SpvChannel error contract): no // bytes reached the network, so the reservation is safe to