File tree Expand file tree Collapse file tree 4 files changed +10
-14
lines changed
Expand file tree Collapse file tree 4 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 11use crate :: { set_last_error, FFIArray , FFIErrorCode } ;
22use dash_spv:: chain:: checkpoints:: { mainnet_checkpoints, testnet_checkpoints, CheckpointManager } ;
3- use dashcore:: Network ;
43use dashcore:: hashes:: Hash ;
4+ use dashcore:: Network ;
55use key_wallet_ffi:: FFINetwork ;
66
77/// FFI representation of a checkpoint (height + block hash)
Original file line number Diff line number Diff line change @@ -361,9 +361,7 @@ pub unsafe extern "C" fn dash_spv_ffi_client_update_config(
361361 if let Some ( ref mut spv_client) = * guard {
362362 spv_client. update_config ( new_config) . await . map_err ( |e| e)
363363 } else {
364- Err ( dash_spv:: SpvError :: Config (
365- "Client not initialized" . to_string ( ) ,
366- ) )
364+ Err ( dash_spv:: SpvError :: Config ( "Client not initialized" . to_string ( ) ) )
367365 }
368366 } ) ;
369367
Original file line number Diff line number Diff line change 11pub mod callbacks;
2+ pub mod checkpoints;
23pub mod client;
34pub mod config;
4- pub mod checkpoints;
55pub mod error;
66pub mod platform_integration;
77pub mod types;
88pub mod utils;
99
1010pub use callbacks:: * ;
11+ pub use checkpoints:: * ;
1112pub use client:: * ;
1213pub use config:: * ;
13- pub use checkpoints:: * ;
1414pub use error:: * ;
1515pub use platform_integration:: * ;
1616pub use types:: * ;
Original file line number Diff line number Diff line change @@ -617,17 +617,15 @@ impl<
617617 /// Changing the network is not supported at runtime.
618618 pub async fn update_config ( & mut self , new_config : ClientConfig ) -> Result < ( ) > {
619619 if new_config. network != self . config . network {
620- return Err ( SpvError :: Config (
621- "Cannot change network at runtime" . to_string ( ) ,
622- ) ) ;
620+ return Err ( SpvError :: Config ( "Cannot change network at runtime" . to_string ( ) ) ) ;
623621 }
624622
625623 // Track changes that may require reinitialization of helpers
626- let mempool_changed =
627- new_config . enable_mempool_tracking != self . config . enable_mempool_tracking
628- || new_config. mempool_strategy != self . config . mempool_strategy
629- || new_config. max_mempool_transactions != self . config . max_mempool_transactions
630- || new_config. recent_send_window_secs != self . config . recent_send_window_secs ;
624+ let mempool_changed = new_config . enable_mempool_tracking
625+ != self . config . enable_mempool_tracking
626+ || new_config. mempool_strategy != self . config . mempool_strategy
627+ || new_config. max_mempool_transactions != self . config . max_mempool_transactions
628+ || new_config. recent_send_window_secs != self . config . recent_send_window_secs ;
631629
632630 // Apply full config replacement, preserving network (already checked equal)
633631 self . config = new_config;
You can’t perform that action at this time.
0 commit comments