Skip to content

Commit d683a58

Browse files
committed
fix: add comments
1 parent 1d2f085 commit d683a58

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

crates/dkg/src/sync/handler.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ async fn handle_inbound_stream(
424424
}
425425
}
426426

427+
// Record observed step even after validation failure.
428+
// Barrier waiters still fail fast on `server.err`
427429
if server.update_step(peer_id, message.step).await? {
428430
send_inbound_event(
429431
&inbound_events_tx,

crates/dkg/src/sync/protocol.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Protocol helpers for the DKG sync protocol.
22
33
use libp2p::identity::{Keypair, PublicKey};
4+
use libp2p::StreamProtocol;
45
use pluto_core::version::SemVer;
56

67
use crate::dkgpb::v1::sync::MsgSync;
@@ -10,8 +11,6 @@ use super::error::{Error, Result};
1011
/// The protocol identifier for DKG sync.
1112
pub const PROTOCOL_NAME: libp2p::StreamProtocol = StreamProtocol::new("/charon/dkg/sync/1.0.0/");
1213

13-
use libp2p::StreamProtocol;
14-
1514
/// Signs the definition hash using the same libp2p signing path as Go.
1615
pub fn sign_definition_hash(secret: &k256::SecretKey, def_hash: &[u8]) -> Result<Vec<u8>> {
1716
let mut der = secret

0 commit comments

Comments
 (0)