Skip to content

Commit 6e6d494

Browse files
Merge branch 'gossipsub_private' of github.com:tcoratger/rust-libp2p into gossipsub_private
2 parents b93b801 + 0761502 commit 6e6d494

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ jobs:
253253
- run: cargo install --version 0.10.0 pb-rs --locked
254254

255255
- name: Glob match
256-
uses: tj-actions/glob@v16
256+
uses: tj-actions/glob@v17
257257
id: glob
258258
with:
259259
files: |

interop-tests/ping-version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"ws",
66
"tcp",
77
"quic-v1",
8-
"webrtc"
8+
"webrtc-direct"
99
],
1010
"secureChannels": [
1111
"tls",

interop-tests/src/bin/ping.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async fn main() -> Result<()> {
7070
.boxed(),
7171
format!("/ip4/{ip}/tcp/0/ws"),
7272
),
73-
Transport::Webrtc => (
73+
Transport::WebRtcDirect => (
7474
webrtc::tokio::Transport::new(
7575
local_key,
7676
webrtc::tokio::Certificate::generate(&mut rand::thread_rng())?,
@@ -213,7 +213,7 @@ fn muxer_protocol_from_env() -> Result<Either<yamux::YamuxConfig, mplex::MplexCo
213213
pub enum Transport {
214214
Tcp,
215215
QuicV1,
216-
Webrtc,
216+
WebRtcDirect,
217217
Ws,
218218
}
219219

@@ -224,7 +224,7 @@ impl FromStr for Transport {
224224
Ok(match s {
225225
"tcp" => Self::Tcp,
226226
"quic-v1" => Self::QuicV1,
227-
"webrtc" => Self::Webrtc,
227+
"webrtc-direct" => Self::WebRtcDirect,
228228
"ws" => Self::Ws,
229229
other => bail!("unknown transport {other}"),
230230
})

protocols/gossipsub/src/subscription_filter_priv.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ impl TopicSubscriptionFilter for RegexSubscriptionFilter {
213213
mod test {
214214
use super::*;
215215
use crate::types::SubscriptionAction::*;
216+
use regex::Regex;
216217
use std::iter::FromIterator;
217218

218219
#[test]

protocols/relay/tests/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,16 @@ fn connect() {
210210
src.dial(dst_addr).unwrap();
211211

212212
pool.run_until(futures::future::join(
213-
connection_established_to(src, relay_peer_id, dst_peer_id),
214-
connection_established_to(dst, relay_peer_id, src_peer_id),
213+
connection_established_to(&mut src, relay_peer_id, dst_peer_id),
214+
connection_established_to(&mut dst, relay_peer_id, src_peer_id),
215215
));
216216
}
217217

218-
async fn connection_established_to(mut swarm: Swarm<Client>, relay_peer_id: PeerId, other: PeerId) {
218+
async fn connection_established_to(
219+
swarm: &mut Swarm<Client>,
220+
relay_peer_id: PeerId,
221+
other: PeerId,
222+
) {
219223
loop {
220224
match swarm.select_next_some().await {
221225
SwarmEvent::Dialing(peer_id) if peer_id == relay_peer_id => {}

0 commit comments

Comments
 (0)