Add documentation fixes

This commit is contained in:
rajarshimaitra
2023-03-10 23:23:29 +05:30
committed by 志宇
parent cd4945af3a
commit 24df03afd6
21 changed files with 316 additions and 316 deletions

View File

@@ -20,7 +20,7 @@ pub trait EsploraAsyncExt {
///
/// - `local_chain`: the most recent block hashes present locally
/// - `keychain_spks`: keychains that we want to scan transactions for
/// - `txids`: transactions that we want updated [`ChainPosition`]s for
/// - `txids`: transactions for which we want updated [`ChainPosition`]s
/// - `outpoints`: transactions associated with these outpoints (residing, spending) that we
/// want to included in the update
///
@@ -120,7 +120,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
if let Err(failure) = update.insert_checkpoint(tip_at_start) {
match failure {
sparse_chain::InsertCheckpointError::HashNotMatching { .. } => {
// there has been a re-org before we started scanning. We haven't consumed any iterators so it's safe to recursively call.
// there was a re-org before we started scanning. We haven't consumed any iterators, so calling this function recursively is safe.
return EsploraAsyncExt::scan(
self,
local_chain,
@@ -151,7 +151,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
let n_confirmed =
related_txs.iter().filter(|tx| tx.status.confirmed).count();
// esplora pages on 25 confirmed transactions. If there's 25 or more we
// esplora pages on 25 confirmed transactions. If there are 25 or more we
// keep requesting to see if there's more.
if n_confirmed >= 25 {
loop {
@@ -200,7 +200,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
}
InsertTxError::Chain(TxMovedUnexpectedly { .. })
| InsertTxError::UnresolvableConflict(_) => {
/* implies reorg during scan. We deal with that below */
/* implies reorg during a scan. We deal with that below */
}
}
}
@@ -234,7 +234,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
}
InsertTxError::Chain(TxMovedUnexpectedly { .. })
| InsertTxError::UnresolvableConflict(_) => {
/* implies reorg during scan. We deal with that below */
/* implies reorg during a scan. We deal with that below */
}
}
}
@@ -270,7 +270,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
}
InsertTxError::Chain(TxMovedUnexpectedly { .. })
| InsertTxError::UnresolvableConflict(_) => {
/* implies reorg during scan. We deal with that below */
/* implies reorg during a scan. We deal with that below */
}
}
}
@@ -286,7 +286,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
};
if reorg_occurred {
// A reorg occurred so lets find out where all the txids we found are in the chain now.
// A reorg occurred, so let's find out where all the txids we found are in the chain now.
// XXX: collect required because of weird type naming issues
let txids_found = update
.chain()

View File

@@ -20,7 +20,7 @@ pub trait EsploraExt {
///
/// - `local_chain`: the most recent block hashes present locally
/// - `keychain_spks`: keychains that we want to scan transactions for
/// - `txids`: transactions that we want updated [`ChainPosition`]s for
/// - `txids`: transactions for which we want updated [`ChainPosition`]s
/// - `outpoints`: transactions associated with these outpoints (residing, spending) that we
/// want to included in the update
///
@@ -106,7 +106,7 @@ impl EsploraExt for esplora_client::BlockingClient {
if let Err(failure) = update.insert_checkpoint(tip_at_start) {
match failure {
sparse_chain::InsertCheckpointError::HashNotMatching { .. } => {
// there has been a re-org before we started scanning. We haven't consumed any iterators so it's safe to recursively call.
// there was a re-org before we started scanning. We haven't consumed any iterators, so calling this function recursively is safe.
return EsploraExt::scan(
self,
local_chain,
@@ -137,7 +137,7 @@ impl EsploraExt for esplora_client::BlockingClient {
let n_confirmed =
related_txs.iter().filter(|tx| tx.status.confirmed).count();
// esplora pages on 25 confirmed transactions. If there's 25 or more we
// esplora pages on 25 confirmed transactions. If there are 25 or more we
// keep requesting to see if there's more.
if n_confirmed >= 25 {
loop {
@@ -184,7 +184,7 @@ impl EsploraExt for esplora_client::BlockingClient {
}
InsertTxError::Chain(TxMovedUnexpectedly { .. })
| InsertTxError::UnresolvableConflict(_) => {
/* implies reorg during scan. We deal with that below */
/* implies reorg during a scan. We deal with that below */
}
}
}
@@ -217,7 +217,7 @@ impl EsploraExt for esplora_client::BlockingClient {
}
InsertTxError::Chain(TxMovedUnexpectedly { .. })
| InsertTxError::UnresolvableConflict(_) => {
/* implies reorg during scan. We deal with that below */
/* implies reorg during a scan. We deal with that below */
}
}
}
@@ -252,7 +252,7 @@ impl EsploraExt for esplora_client::BlockingClient {
}
InsertTxError::Chain(TxMovedUnexpectedly { .. })
| InsertTxError::UnresolvableConflict(_) => {
/* implies reorg during scan. We deal with that below */
/* implies reorg during a scan. We deal with that below */
}
}
}
@@ -268,7 +268,7 @@ impl EsploraExt for esplora_client::BlockingClient {
};
if reorg_occurred {
// A reorg occurred so lets find out where all the txids we found are in the chain now.
// A reorg occurred, so let's find out where all the txids we found are now in the chain.
// XXX: collect required because of weird type naming issues
let txids_found = update
.chain()