Skip to content

Commit 02ffd42

Browse files
committed
f Log txid on broadcast failure
1 parent da3065b commit 02ffd42

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/wallet.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,23 +318,23 @@ where
318318
let mut errors = Vec::new();
319319

320320
for tx in txs {
321-
handles.push(self.blockchain.broadcast(tx));
321+
handles.push((tx.txid(), self.blockchain.broadcast(tx)));
322322
}
323323

324324
for handle in handles {
325-
match handle.await {
325+
match handle.1.await {
326326
Ok(_) => {}
327327
Err(e) => {
328-
errors.push(e);
328+
errors.push((e, handle.0));
329329
}
330330
}
331331
}
332332
errors
333333
})
334334
});
335335

336-
for e in errors {
337-
log_error!(self.logger, "Failed to broadcast transaction: {}", e);
336+
for (e, txid) in errors {
337+
log_error!(self.logger, "Failed to broadcast transaction {}: {}", txid, e);
338338
}
339339
}
340340
}

0 commit comments

Comments
 (0)