Skip to content

Commit bab0d8b

Browse files
committed
fix(kyoto): remove conn requirement to send tx
Kyoto now holds on to a transaction internally until it is successfully broadcast, so we can broadcast the transaction immediately once the node starts up, and wait for a confirmation or 60 second timeout
1 parent 85da2af commit bab0d8b

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/handlers.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -577,18 +577,10 @@ pub(crate) async fn handle_online_wallet_subcommand(
577577
});
578578
let txid = tx.compute_txid();
579579
tracing::info!("Waiting for connections to broadcast...");
580-
while let Some(info) = info_subscriber.recv().await {
581-
match info {
582-
Info::ConnectionsMet => {
583-
requester
584-
.broadcast_random(tx.clone())
585-
.map_err(|e| Error::Generic(format!("{}", e)))?;
586-
break;
587-
}
588-
_ => tracing::info!("{info}"),
589-
}
590-
}
591-
tokio::time::timeout(tokio::time::Duration::from_secs(15), async move {
580+
requester
581+
.broadcast_random(tx.clone())
582+
.map_err(|e| Error::Generic(format!("{}", e)))?;
583+
tokio::time::timeout(tokio::time::Duration::from_secs(30), async move {
592584
while let Some(info) = info_subscriber.recv().await {
593585
match info {
594586
Info::TxGossiped(wtxid) => {

0 commit comments

Comments
 (0)