Fix comments

This commit is contained in:
LLFourn 2021-11-05 12:44:36 +11:00
parent d39401162f
commit d3779fac73
No known key found for this signature in database
GPG Key ID: A27093B54DA11F65
3 changed files with 6 additions and 5 deletions

View File

@ -112,8 +112,8 @@ impl Blockchain for EsploraBlockchain {
let n_confirmed = let n_confirmed =
related_txs.iter().filter(|tx| tx.status.confirmed).count(); related_txs.iter().filter(|tx| tx.status.confirmed).count();
// esplora pages on 25 confirmed transactions. If there's more than // esplora pages on 25 confirmed transactions. If there's 25 or more we
// 25 we need to keep requesting. // keep requesting to see if there's more.
if n_confirmed >= 25 { if n_confirmed >= 25 {
loop { loop {
let new_related_txs: Vec<Tx> = self let new_related_txs: Vec<Tx> = self

View File

@ -111,8 +111,8 @@ impl Blockchain for EsploraBlockchain {
let n_confirmed = let n_confirmed =
related_txs.iter().filter(|tx| tx.status.confirmed).count(); related_txs.iter().filter(|tx| tx.status.confirmed).count();
// esplora pages on 25 confirmed transactions. If there's more than // esplora pages on 25 confirmed transactions. If there's 25 or more we
// 25 we need to keep requesting. // keep requesting to see if there's more.
if n_confirmed >= 25 { if n_confirmed >= 25 {
loop { loop {
let new_related_txs: Vec<Tx> = client._scripthash_txs( let new_related_txs: Vec<Tx> = client._scripthash_txs(

View File

@ -92,10 +92,11 @@ impl<'a, D: BatchDatabase> ScriptReq<'a, D> {
self.state.tx_missing_conftime.insert(*txid, details); self.state.tx_missing_conftime.insert(*txid, details);
} }
(Some(old_height), Some(new_height)) if old_height != *new_height => { (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); self.state.tx_missing_conftime.insert(*txid, details);
} }
(Some(_), None) => { (Some(_), None) => {
// A re-org where the tx is not in the chain anymore.
details.confirmation_time = None; details.confirmation_time = None;
self.state.finished_txs.push(details); self.state.finished_txs.push(details);
} }