Fix comments
This commit is contained in:
parent
d39401162f
commit
d3779fac73
@ -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
|
||||||
|
@ -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(
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user