Skip to content

Commit 77a3d84

Browse files
fmt
1 parent 759bf25 commit 77a3d84

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

dash-spv-ffi/src/checkpoints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::{set_last_error, FFIArray, FFIErrorCode};
22
use dash_spv::chain::checkpoints::{mainnet_checkpoints, testnet_checkpoints, CheckpointManager};
3-
use dashcore::Network;
43
use dashcore::hashes::Hash;
4+
use dashcore::Network;
55
use key_wallet_ffi::FFINetwork;
66

77
/// FFI representation of a checkpoint (height + block hash)

dash-spv-ffi/src/client.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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

dash-spv-ffi/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
pub mod callbacks;
2+
pub mod checkpoints;
23
pub mod client;
34
pub mod config;
4-
pub mod checkpoints;
55
pub mod error;
66
pub mod platform_integration;
77
pub mod types;
88
pub mod utils;
99

1010
pub use callbacks::*;
11+
pub use checkpoints::*;
1112
pub use client::*;
1213
pub use config::*;
13-
pub use checkpoints::*;
1414
pub use error::*;
1515
pub use platform_integration::*;
1616
pub use types::*;

dash-spv/src/client/mod.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)