]> Untitled Git - bdk/commitdiff
Fix comments
authorLLFourn <lloyd.fourn@gmail.com>
Fri, 5 Nov 2021 01:44:36 +0000 (12:44 +1100)
committerLLFourn <lloyd.fourn@gmail.com>
Tue, 9 Nov 2021 22:07:36 +0000 (09:07 +1100)
src/blockchain/esplora/reqwest.rs
src/blockchain/esplora/ureq.rs
src/blockchain/script_sync.rs

index 626b8741c0dd21f86f7854978e2670513329639f..aaf487e4a720808f3f27713f29636145445a3316 100644 (file)
@@ -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<Tx> = self
index 339843e6f09bd630bd9cad7450a4c3ec37a4f78b..f3895a15f10e31cb028e1fe71c5a8e854526b85e 100644 (file)
@@ -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<Tx> = client._scripthash_txs(
index 7d76d96e42e2bd51a87c4e7802267fda81c24432..f78a6bced101b177270303eed432da5e8a84e2f0 100644 (file)
@@ -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);
                             }