File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ impl BitcoinRpc {
356
356
}
357
357
358
358
fn parse_error_bytes ( status : StatusCode , res_bytes : & [ u8 ] ) -> BitcoinRpcError {
359
- let parsed_response: Result < JsonRpcResponse < String > , serde_json:: Error > =
359
+ let parsed_response: Result < JsonRpcResponse < Option < String > > , serde_json:: Error > =
360
360
serde_json:: from_slice ( & res_bytes) ;
361
361
362
362
match parsed_response {
Original file line number Diff line number Diff line change @@ -563,7 +563,6 @@ impl RpcWallet {
563
563
source. clone ( ) ,
564
564
num_workers) ;
565
565
566
-
567
566
let mut wallet_tip = {
568
567
let tip = wallet. local_chain ( ) . tip ( ) ;
569
568
ChainAnchor {
@@ -574,10 +573,12 @@ impl RpcWallet {
574
573
575
574
let mut shutdown_recv = shutdown. subscribe ( ) ;
576
575
577
- let mut cbf_sync = CompactFilterSync :: new ( & wallet) ;
578
- if !cbf {
576
+ let mut cbf_sync = if cbf {
577
+ Some ( CompactFilterSync :: new ( & wallet) )
578
+ } else {
579
579
fetcher. start ( wallet_tip) ;
580
- }
580
+ None
581
+ } ;
581
582
582
583
let mut synced_at_least_once = false ;
583
584
let mut last_mempool_check = Instant :: now ( ) ;
@@ -607,7 +608,7 @@ impl RpcWallet {
607
608
}
608
609
609
610
// Compact Filter Sync:
610
- if cbf && ! cbf_sync. synced ( ) {
611
+ if let Some ( cbf_sync ) = cbf_sync. as_mut ( ) {
611
612
cbf_sync. sync_next ( & mut wallet, & source, & mut wallet_progress) ?;
612
613
613
614
// Once compact filter sync is complete
You can’t perform that action at this time.
0 commit comments