Skip to content

Commit 98e1a5b

Browse files
authored
Merge pull request #982 from openmina/feat/p2p/webrtc/datachannel-rs
P2p WebRTC: add datachannel-rs backend
2 parents 5445657 + 4fbafad commit 98e1a5b

File tree

15 files changed

+727
-137
lines changed

15 files changed

+727
-137
lines changed

Cargo.lock

Lines changed: 182 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/src/channels.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pub use tokio::sync::{broadcast, mpsc, oneshot};
1+
pub use tokio::sync::{broadcast, mpsc, oneshot, watch};

node/native/src/node/builder.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ impl NodeBuilder {
291291
}
292292

293293
pub fn build(mut self) -> anyhow::Result<Node> {
294-
let p2p_sec_key = self.p2p_sec_key.unwrap_or_else(P2pSecretKey::rand);
294+
let p2p_sec_key = self.p2p_sec_key.clone().unwrap_or_else(P2pSecretKey::rand);
295+
self.p2p_sec_key(p2p_sec_key.clone());
295296
if self.p2p.initial_peers.is_empty() && !self.p2p_is_seed {
296297
self.p2p.initial_peers = default_peers();
297298
}

node/src/event_source/event_source_effects.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ pub fn event_source_effects<S: Service>(store: &mut Store<S>, action: EventSourc
198198
},
199199
P2pConnectionEvent::Closed(peer_id) => {
200200
store.dispatch(P2pDisconnectionAction::PeerClosed { peer_id });
201+
store.dispatch(P2pDisconnectionAction::Finish { peer_id });
201202
}
202203
},
203204
P2pEvent::Channel(e) => match e {

0 commit comments

Comments
 (0)