Actively wait for result to arrive the test node

This commit is contained in:
Daniel Sanchez Quiros 2022-10-12 11:36:06 -05:00
parent 464fbcd98b
commit ffe30171e2

View File

@ -1,7 +1,7 @@
use multiaddr::Multiaddr;
use std::net::IpAddr;
use std::str::FromStr;
use std::time::SystemTime;
use std::time::{Duration, SystemTime};
use waku::{
waku_new, waku_set_event_callback, Encoding, Event, ProtocolId, WakuContentTopic, WakuMessage,
WakuNodeConfig,
@ -71,7 +71,7 @@ pub fn main() -> Result<(), String> {
);
node.relay_publish_message(&message, None, None)?;
std::thread::sleep(Duration::from_secs(2));
node.stop()?;
Ok(())
}