@@ -46,11 +46,11 @@ use std::collections::HashSet;
46
46
type FutureResult < ' a , T , E > = Pin < Box < dyn Future < Output = Result < T , E > > + Send + ' a > > ;
47
47
48
48
pub use bdk_wallet:: chain:: local_chain:: MissingGenesisError ;
49
+ pub use bdk_wallet:: Update ;
49
50
50
51
use bdk_wallet:: chain:: {
51
52
keychain_txout:: KeychainTxOutIndex ,
52
53
local_chain:: { self , CheckPoint , LocalChain } ,
53
- spk_client:: FullScanResponse ,
54
54
IndexedTxGraph ,
55
55
} ;
56
56
use bdk_wallet:: chain:: { ConfirmationBlockTime , TxUpdate } ;
@@ -120,7 +120,7 @@ impl UpdateSubscriber {
120
120
/// A reference to a [`NodeEventHandler`] is required, which handles events emitted from a
121
121
/// running node. Production applications should define how the application handles
122
122
/// these events and displays them to end users.
123
- pub async fn update ( & mut self ) -> Option < FullScanResponse < KeychainKind > > {
123
+ pub async fn update ( & mut self ) -> Option < Update > {
124
124
let mut chain_changeset = BTreeMap :: new ( ) ;
125
125
while let Some ( message) = self . receiver . recv ( ) . await {
126
126
match message {
@@ -161,15 +161,15 @@ impl UpdateSubscriber {
161
161
162
162
// When the client is believed to have synced to the chain tip of most work,
163
163
// we can return a wallet update.
164
- fn get_scan_response ( & mut self ) -> FullScanResponse < KeychainKind > {
164
+ fn get_scan_response ( & mut self ) -> Update {
165
165
let tx_update = TxUpdate :: from ( self . graph . graph ( ) . clone ( ) ) ;
166
166
let graph = core:: mem:: take ( & mut self . graph ) ;
167
167
let last_active_indices = graph. index . last_used_indices ( ) ;
168
168
self . graph = IndexedTxGraph :: new ( graph. index ) ;
169
- FullScanResponse {
169
+ Update {
170
170
tx_update,
171
171
last_active_indices,
172
- chain_update : Some ( self . chain . tip ( ) ) ,
172
+ chain : Some ( self . chain . tip ( ) ) ,
173
173
}
174
174
}
175
175
}
0 commit comments