@@ -24,9 +24,7 @@ use core::{cmp::Ordering, fmt, mem, ops::Deref};
24
24
use bdk_chain:: {
25
25
indexed_tx_graph,
26
26
indexer:: keychain_txout:: KeychainTxOutIndex ,
27
- local_chain:: {
28
- self , ApplyHeaderError , CannotConnectError , CheckPoint , CheckPointIter , LocalChain ,
29
- } ,
27
+ local_chain:: { ApplyHeaderError , CannotConnectError , CheckPoint , CheckPointIter , LocalChain } ,
30
28
spk_client:: {
31
29
FullScanRequest , FullScanRequestBuilder , FullScanResult , SyncRequest , SyncRequestBuilder ,
32
30
SyncResult ,
@@ -120,7 +118,7 @@ pub struct Wallet {
120
118
121
119
/// An update to [`Wallet`].
122
120
///
123
- /// It updates [`KeychainTxOutIndex`], [`bdk_chain::TxGraph`] and [`local_chain:: LocalChain`] atomically.
121
+ /// It updates [`KeychainTxOutIndex`], [`bdk_chain::TxGraph`] and [`LocalChain`] atomically.
124
122
#[ derive( Debug , Clone , Default ) ]
125
123
pub struct Update {
126
124
/// Contains the last active derivation indices per keychain (`K`), which is used to update the
@@ -131,8 +129,6 @@ pub struct Update {
131
129
pub tx_update : TxUpdate < ConfirmationBlockTime > ,
132
130
133
131
/// Update for the wallet's internal [`LocalChain`].
134
- ///
135
- /// [`LocalChain`]: local_chain::LocalChain
136
132
pub chain : Option < CheckPoint > ,
137
133
}
138
134
@@ -1068,44 +1064,6 @@ impl Wallet {
1068
1064
} )
1069
1065
}
1070
1066
1071
- /// Add a new checkpoint to the wallet's internal view of the chain.
1072
- ///
1073
- /// Returns whether anything changed with the insertion (e.g. `false` if checkpoint was already
1074
- /// there).
1075
- ///
1076
- /// **WARNING**: You must persist the changes resulting from one or more calls to this method
1077
- /// if you need the inserted checkpoint data to be reloaded after closing the wallet.
1078
- /// See [`Wallet::reveal_next_address`].
1079
- pub fn insert_checkpoint (
1080
- & mut self ,
1081
- block_id : BlockId ,
1082
- ) -> Result < bool , local_chain:: AlterCheckPointError > {
1083
- let changeset = self . chain . insert_block ( block_id) ?;
1084
- let changed = !changeset. is_empty ( ) ;
1085
- self . stage . merge ( changeset. into ( ) ) ;
1086
- Ok ( changed)
1087
- }
1088
-
1089
- /// Add a transaction to the wallet's internal view of the chain. This stages the change,
1090
- /// you must persist it later.
1091
- ///
1092
- /// This method inserts the given `tx` and returns whether anything changed after insertion,
1093
- /// which will be false if the same transaction already exists in the wallet's transaction
1094
- /// graph. Any changes are staged but not committed.
1095
- ///
1096
- /// # Note
1097
- ///
1098
- /// By default the inserted `tx` won't be considered "canonical" because it's not known
1099
- /// whether the transaction exists in the best chain. To know whether it exists, the tx
1100
- /// must be broadcast to the network and the wallet synced via a chain source.
1101
- pub fn insert_tx < T : Into < Arc < Transaction > > > ( & mut self , tx : T ) -> bool {
1102
- let mut changeset = ChangeSet :: default ( ) ;
1103
- changeset. merge ( self . indexed_graph . insert_tx ( tx) . into ( ) ) ;
1104
- let ret = !changeset. is_empty ( ) ;
1105
- self . stage . merge ( changeset) ;
1106
- ret
1107
- }
1108
-
1109
1067
/// Iterate over the transactions in the wallet.
1110
1068
pub fn transactions ( & self ) -> impl Iterator < Item = WalletTx > + ' _ {
1111
1069
self . indexed_graph
0 commit comments