bdk_electrum API improvements and simplifications

* `ElectrumUpdate::missing_full_txs` now returns a `Vec<Txid>` so we
  don't keep a reference to the passed-in `graph`.

* `ElectrumUpdate::finalize*` methods now takes in `missing` txids
  instead of `full_txs`. `Client::batch_transaction_get` is called
within the methods.

Other changes:

* `wallet::ChangeSet` is now made public externally. This is required as
  a wallet db should implement `PersistBackend<wallet::ChangeSet>`.
This commit is contained in:
志宇
2023-05-18 10:02:23 +08:00
parent 92709d03ce
commit 78a7920ba3
3 changed files with 23 additions and 28 deletions

View File

@@ -97,7 +97,8 @@ pub struct Wallet<D = ()> {
pub type Update = LocalUpdate<KeychainKind, ConfirmationTimeAnchor>;
// /// The changeset produced internally by applying an update.
pub(crate) type ChangeSet = LocalChangeSet<KeychainKind, ConfirmationTimeAnchor>;
pub type ChangeSet = LocalChangeSet<KeychainKind, ConfirmationTimeAnchor>;
/// The address index selection strategy to use to derived an address from the wallet's external
/// descriptor. See [`Wallet::get_address`]. If you're unsure which one to use use `WalletIndex::New`.
#[derive(Debug)]