From d3779fac73321f41b82897e6ab69708c957212b2 Mon Sep 17 00:00:00 2001 From: LLFourn Date: Fri, 5 Nov 2021 12:44:36 +1100 Subject: [PATCH] Fix comments --- src/blockchain/esplora/reqwest.rs | 4 ++-- src/blockchain/esplora/ureq.rs | 4 ++-- src/blockchain/script_sync.rs | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/blockchain/esplora/reqwest.rs b/src/blockchain/esplora/reqwest.rs index 626b8741..aaf487e4 100644 --- a/src/blockchain/esplora/reqwest.rs +++ b/src/blockchain/esplora/reqwest.rs @@ -112,8 +112,8 @@ impl Blockchain for EsploraBlockchain { let n_confirmed = related_txs.iter().filter(|tx| tx.status.confirmed).count(); - // esplora pages on 25 confirmed transactions. If there's more than - // 25 we need to keep requesting. + // esplora pages on 25 confirmed transactions. If there's 25 or more we + // keep requesting to see if there's more. if n_confirmed >= 25 { loop { let new_related_txs: Vec = self diff --git a/src/blockchain/esplora/ureq.rs b/src/blockchain/esplora/ureq.rs index 339843e6..f3895a15 100644 --- a/src/blockchain/esplora/ureq.rs +++ b/src/blockchain/esplora/ureq.rs @@ -111,8 +111,8 @@ impl Blockchain for EsploraBlockchain { let n_confirmed = related_txs.iter().filter(|tx| tx.status.confirmed).count(); - // esplora pages on 25 confirmed transactions. If there's more than - // 25 we need to keep requesting. + // esplora pages on 25 confirmed transactions. If there's 25 or more we + // keep requesting to see if there's more. if n_confirmed >= 25 { loop { let new_related_txs: Vec = client._scripthash_txs( diff --git a/src/blockchain/script_sync.rs b/src/blockchain/script_sync.rs index 7d76d96e..f78a6bce 100644 --- a/src/blockchain/script_sync.rs +++ b/src/blockchain/script_sync.rs @@ -92,10 +92,11 @@ impl<'a, D: BatchDatabase> ScriptReq<'a, D> { self.state.tx_missing_conftime.insert(*txid, details); } (Some(old_height), Some(new_height)) if old_height != *new_height => { - // The height of the tx has changed !? -- get the confirmation time. + // The height of the tx has changed !? -- It's a reorg get the new confirmation time. self.state.tx_missing_conftime.insert(*txid, details); } (Some(_), None) => { + // A re-org where the tx is not in the chain anymore. details.confirmation_time = None; self.state.finished_txs.push(details); }