parent
fe5af61e54
commit
9b865c3ece
File diff suppressed because it is too large
Load Diff
|
@ -7,7 +7,7 @@ edition = "2021"
|
|||
|
||||
[dependencies]
|
||||
tokio = { version = "1", features = ["rt"] }
|
||||
waku = { git = "https://github.com/waku-org/waku-rust-bindings" }
|
||||
waku-bindings = "0.3.1"
|
||||
serde = "1"
|
||||
bincode = "1"
|
||||
overwatch-rs = { path = "../../overwatch-rs" }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use super::*;
|
||||
use ::waku::*;
|
||||
use ::waku_bindings::*;
|
||||
use std::str::FromStr;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::time::SystemTime;
|
||||
|
@ -20,7 +20,7 @@ impl NetworkBackend for Waku {
|
|||
for peer in config.peers {
|
||||
let addr = Multiaddr::from_str(&peer).unwrap();
|
||||
let peer_id = waku.add_peer(&addr, waku::ProtocolId::Relay).unwrap();
|
||||
waku.connect_peer_with_id(peer_id, None).unwrap();
|
||||
waku.connect_peer_with_id(&peer_id, None).unwrap();
|
||||
}
|
||||
waku.relay_subscribe(None).unwrap();
|
||||
assert!(waku.relay_enough_peers(None).unwrap());
|
||||
|
@ -66,6 +66,8 @@ impl NetworkBackend for Waku {
|
|||
.duration_since(SystemTime::UNIX_EPOCH)
|
||||
.unwrap()
|
||||
.as_secs() as usize,
|
||||
"",
|
||||
false,
|
||||
);
|
||||
let msg_id = self
|
||||
.waku
|
||||
|
|
|
@ -58,7 +58,7 @@ impl<StateInput: ServiceState> StateOperator for NoOperator<StateInput> {
|
|||
type StateInput = StateInput;
|
||||
|
||||
fn from_settings<Settings>(_settings: Settings) -> Self {
|
||||
NoOperator(PhantomData::default())
|
||||
NoOperator(PhantomData)
|
||||
}
|
||||
|
||||
fn run<'borrow, 'fut>(
|
||||
|
|
Loading…
Reference in New Issue