Skip to content

Commit 56924cc

Browse files
VictorLuxclaude
andcommitted
style: Run cargo fmt on zipherx-network
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 23fae63 commit 56924cc

4 files changed

Lines changed: 7 additions & 18 deletions

File tree

crates/zipherx-network/src/block_fetcher.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ pub fn parse_raw_block(
191191
/// - vShieldedSpend
192192
/// - vShieldedOutput
193193
/// - binding_sig (64) — only if shielded data present
194-
pub fn parse_transaction(
195-
data: &[u8],
196-
) -> Option<ParsedTransaction> {
194+
pub fn parse_transaction(data: &[u8]) -> Option<ParsedTransaction> {
197195
if data.len() < 12 {
198196
return None;
199197
}

crates/zipherx-network/src/dispatcher.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,7 @@ impl Dispatcher {
8686
/// "headers" OR "reject" — reject handling falls through to the broadcast
8787
/// handler path in dispatch(). If true multi-command support is needed,
8888
/// this should be refactored to use an Arc<Mutex<Option<Sender>>>.
89-
pub fn register_any_handler(
90-
&mut self,
91-
commands: &[&str],
92-
) -> oneshot::Receiver<MessagePayload> {
89+
pub fn register_any_handler(&mut self, commands: &[&str]) -> oneshot::Receiver<MessagePayload> {
9390
let (tx, rx) = oneshot::channel();
9491

9592
// We clone the sender for all but the last command.

crates/zipherx-network/src/header_sync.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ impl<S: HeaderStore> HeaderSync<S> {
292292
let locator_hash = if let Some(hash) = last_known_hash {
293293
hash
294294
} else if current_height > 0 {
295-
self.store.get_header_hash(current_height - 1)?
295+
self.store
296+
.get_header_hash(current_height - 1)?
296297
.unwrap_or([0u8; 32])
297298
} else {
298299
[0u8; 32]
@@ -447,7 +448,8 @@ impl<S: HeaderStore> HeaderSync<S> {
447448
// RN-1: Verify every 10th header (10% coverage) instead of every
448449
// 100th (1%). This provides much better PoW verification coverage
449450
// with only a modest performance cost during bulk sync.
450-
let should_verify = remaining < 1000 || height.is_multiple_of(10) || is_last_in_batch;
451+
let should_verify =
452+
remaining < 1000 || height.is_multiple_of(10) || is_last_in_batch;
451453

452454
if should_verify {
453455
match zipherx_crypto::equihash::verify(&header_base, &header.solution) {

crates/zipherx-network/src/peer.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,7 @@ impl Peer {
242242
};
243243

244244
let handle = tokio::spawn(async move {
245-
block_listener_loop(
246-
reader,
247-
writer,
248-
dispatcher,
249-
cancel_clone,
250-
peer_id,
251-
callbacks,
252-
)
253-
.await;
245+
block_listener_loop(reader, writer, dispatcher, cancel_clone, peer_id, callbacks).await;
254246
});
255247

256248
self.listener_cancel = Some(cancel);

0 commit comments

Comments
 (0)