We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f1d66c commit 0234637Copy full SHA for 0234637
tests/common/mod.rs
@@ -437,16 +437,10 @@ pub(crate) fn wait_for_block<E: ElectrumApi>(electrs: &E, min_height: usize) {
437
}
438
439
pub(crate) fn wait_for_tx<E: ElectrumApi>(electrs: &E, txid: Txid) {
440
- let mut tx_res = electrs.transaction_get(&txid);
441
- loop {
442
- if tx_res.is_ok() {
443
- break;
444
- }
445
- tx_res = exponential_backoff_poll(|| {
446
- electrs.ping().unwrap();
447
- Some(electrs.transaction_get(&txid))
448
- });
449
+ exponential_backoff_poll(|| {
+ electrs.ping().unwrap();
+ electrs.transaction_get(&txid).ok()
+ });
450
451
452
pub(crate) fn wait_for_outpoint_spend<E: ElectrumApi>(electrs: &E, outpoint: OutPoint) {
0 commit comments