docs: fix spelling errors
This commit is contained in:
@@ -231,7 +231,7 @@ impl Wallet {
|
||||
pub enum NewError<P> {
|
||||
/// There was problem with the descriptors passed in
|
||||
Descriptor(crate::descriptor::DescriptorError),
|
||||
/// We were unable to load the wallet's data from the persistance backend
|
||||
/// We were unable to load the wallet's data from the persistence backend
|
||||
Persist(P),
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ where
|
||||
match self {
|
||||
NewError::Descriptor(e) => e.fmt(f),
|
||||
NewError::Persist(e) => {
|
||||
write!(f, "failed to load wallet from persistance backend: {}", e)
|
||||
write!(f, "failed to load wallet from persistence backend: {}", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -455,9 +455,9 @@ impl<D> Wallet<D> {
|
||||
|
||||
/// Returns a iterators of all the script pubkeys for the `Internal` and External` variants in `KeychainKind`.
|
||||
///
|
||||
/// This is inteded to be used when doing a full scan of your addresses (e.g. after restoring
|
||||
/// This is intended to be used when doing a full scan of your addresses (e.g. after restoring
|
||||
/// from seed words). You pass the `BTreeMap` of iterators to a blockchain data source (e.g.
|
||||
/// electrum server) which will go through each address until it reaches a *stop grap*.
|
||||
/// electrum server) which will go through each address until it reaches a *stop gap*.
|
||||
///
|
||||
/// Note carefully that iterators go over **all** script pubkeys on the keychains (not what
|
||||
/// script pubkeys the wallet is storing internally).
|
||||
|
||||
@@ -215,7 +215,7 @@ impl<A: Anchor> FullTxOut<A> {
|
||||
/// Whether the `txout` is considered mature.
|
||||
///
|
||||
/// Depending on the implementation of [`confirmation_height_upper_bound`] in [`Anchor`], this
|
||||
/// method may return false-negatives. In other words, interpretted confirmation count may be
|
||||
/// method may return false-negatives. In other words, interpreted confirmation count may be
|
||||
/// less than the actual value.
|
||||
///
|
||||
/// [`confirmation_height_upper_bound`]: Anchor::confirmation_height_upper_bound
|
||||
@@ -239,10 +239,10 @@ impl<A: Anchor> FullTxOut<A> {
|
||||
|
||||
/// Whether the utxo is/was/will be spendable with chain `tip`.
|
||||
///
|
||||
/// This method does not take into account the locktime.
|
||||
/// This method does not take into account the lock time.
|
||||
///
|
||||
/// Depending on the implementation of [`confirmation_height_upper_bound`] in [`Anchor`], this
|
||||
/// method may return false-negatives. In other words, interpretted confirmation count may be
|
||||
/// method may return false-negatives. In other words, interpreted confirmation count may be
|
||||
/// less than the actual value.
|
||||
///
|
||||
/// [`confirmation_height_upper_bound`]: Anchor::confirmation_height_upper_bound
|
||||
|
||||
@@ -18,7 +18,7 @@ pub type ChangeSet = BTreeMap<u32, Option<BlockHash>>;
|
||||
///
|
||||
/// Each checkpoint contains the height and hash of a block ([`BlockId`]).
|
||||
///
|
||||
/// Internaly, checkpoints are nodes of a reference-counted linked-list. This allows the caller to
|
||||
/// Internally, checkpoints are nodes of a reference-counted linked-list. This allows the caller to
|
||||
/// cheaply clone a [`CheckPoint`] without copying the whole list and to view the entire chain
|
||||
/// without holding a lock on [`LocalChain`].
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -427,7 +427,7 @@ impl core::fmt::Display for InsertBlockError {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"failed to insert block at height {} as blockhashes conflict: original={}, update={}",
|
||||
"failed to insert block at height {} as block hashes conflict: original={}, update={}",
|
||||
self.height, self.original_hash, self.update_hash
|
||||
)
|
||||
}
|
||||
@@ -498,7 +498,7 @@ fn merge_chains(
|
||||
prev_orig = curr_orig.take();
|
||||
|
||||
// OPTIMIZATION: we have run out of update blocks so we don't need to continue
|
||||
// iterating becuase there's no possibility of adding anything to changeset.
|
||||
// iterating because there's no possibility of adding anything to changeset.
|
||||
if u.is_none() {
|
||||
break;
|
||||
}
|
||||
@@ -507,7 +507,7 @@ fn merge_chains(
|
||||
if o.hash() == u.hash() {
|
||||
// We have found our point of agreement 🎉 -- we require that the previous (i.e.
|
||||
// higher because we are iterating backwards) block in the original chain was
|
||||
// invalidated (if it exists). This ensures that there is an unambigious point of
|
||||
// invalidated (if it exists). This ensures that there is an unambiguous point of
|
||||
// connection to the original chain from the update chain (i.e. we know the
|
||||
// precisely which original blocks are invalid).
|
||||
if !prev_orig_was_invalidated && !point_of_agreement_found {
|
||||
|
||||
@@ -27,19 +27,19 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Stage a `changeset` to be commited later with [`commit`].
|
||||
/// Stage a `changeset` to be committed later with [`commit`].
|
||||
///
|
||||
/// [`commit`]: Self::commit
|
||||
pub fn stage(&mut self, changeset: C) {
|
||||
self.stage.append(changeset)
|
||||
}
|
||||
|
||||
/// Get the changes that have not been commited yet.
|
||||
/// Get the changes that have not been committed yet.
|
||||
pub fn staged(&self) -> &C {
|
||||
&self.stage
|
||||
}
|
||||
|
||||
/// Commit the staged changes to the underlying persistance backend.
|
||||
/// Commit the staged changes to the underlying persistence backend.
|
||||
///
|
||||
/// Changes that are committed (if any) are returned.
|
||||
///
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# BDK Esplora
|
||||
|
||||
BDK Esplora extends [`esplora_client`](crate::esplora_client) to update [`bdk_chain`] structures
|
||||
BDK Esplora extends [`esplora-client`] to update [`bdk_chain`] structures
|
||||
from an Esplora server.
|
||||
|
||||
## Usage
|
||||
@@ -31,3 +31,6 @@ use bdk_esplora::EsploraExt;
|
||||
```
|
||||
|
||||
For full examples, refer to [`example-crates/wallet_esplora`](https://github.com/bitcoindevkit/bdk/tree/master/example-crates/wallet_esplora) (blocking) and [`example-crates/wallet_esplora_async`](https://github.com/bitcoindevkit/bdk/tree/master/example-crates/wallet_esplora_async).
|
||||
|
||||
[`esplora-client`]: https://docs.rs/esplora-client/
|
||||
[`bdk_chain`]: https://docs.rs/bdk-chain/
|
||||
|
||||
@@ -136,7 +136,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
|
||||
|
||||
// the updated hash (block hash at this height after the update), can either be:
|
||||
// 1. a block that already existed in `fetched_blocks`
|
||||
// 2. a block that exists locally and atleast has a depth of ASSUME_FINAL_DEPTH
|
||||
// 2. a block that exists locally and at least has a depth of ASSUME_FINAL_DEPTH
|
||||
// 3. otherwise we can freshly fetch the block from remote, which is safe as it
|
||||
// is guaranteed that this would be at or below ASSUME_FINAL_DEPTH from the
|
||||
// remote tip
|
||||
@@ -160,7 +160,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
|
||||
let first_new_height = *fetched_blocks
|
||||
.keys()
|
||||
.next()
|
||||
.expect("must have atleast one new block");
|
||||
.expect("must have at least one new block");
|
||||
if first_new_height >= local_block.height {
|
||||
break;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
|
||||
let (&height, &hash) = fetched_blocks
|
||||
.iter()
|
||||
.next()
|
||||
.expect("must have atleast one new block");
|
||||
.expect("must have at least one new block");
|
||||
CheckPoint::new(BlockId { height, hash })
|
||||
}
|
||||
};
|
||||
|
||||
@@ -127,7 +127,7 @@ impl EsploraExt for esplora_client::BlockingClient {
|
||||
|
||||
// the updated hash (block hash at this height after the update), can either be:
|
||||
// 1. a block that already existed in `fetched_blocks`
|
||||
// 2. a block that exists locally and atleast has a depth of ASSUME_FINAL_DEPTH
|
||||
// 2. a block that exists locally and at least has a depth of ASSUME_FINAL_DEPTH
|
||||
// 3. otherwise we can freshly fetch the block from remote, which is safe as it
|
||||
// is guaranteed that this would be at or below ASSUME_FINAL_DEPTH from the
|
||||
// remote tip
|
||||
@@ -151,7 +151,7 @@ impl EsploraExt for esplora_client::BlockingClient {
|
||||
let first_new_height = *fetched_blocks
|
||||
.keys()
|
||||
.next()
|
||||
.expect("must have atleast one new block");
|
||||
.expect("must have at least one new block");
|
||||
if first_new_height >= local_block.height {
|
||||
break;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ impl EsploraExt for esplora_client::BlockingClient {
|
||||
let (&height, &hash) = fetched_blocks
|
||||
.iter()
|
||||
.next()
|
||||
.expect("must have atleast one new block");
|
||||
.expect("must have at least one new block");
|
||||
CheckPoint::new(BlockId { height, hash })
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user