Start using 'observer' concept in mini protocols

This commit is contained in:
Santiago Carmuega 2021-12-01 22:30:56 -03:00
parent 22b19e4cf3
commit 4286ab045d
4 changed files with 31 additions and 22 deletions

View file

@ -1,4 +1,4 @@
use pallas_chainsync::{ClientConsumer, NoopStorage};
use pallas_chainsync::{ClientConsumer, NoopObserver};
use pallas_handshake::n2c::{Client, VersionTable};
use pallas_handshake::MAINNET_MAGIC;
use pallas_machines::primitives::Point;
@ -27,7 +27,7 @@ fn main() {
)];
let cs_channel = muxer.use_channel(5);
let cs = ClientConsumer::initial(known_points, NoopStorage { });
let cs = ClientConsumer::initial(known_points, NoopObserver { });
let cs = run_agent(cs, cs_channel).unwrap();
println!("{:?}", cs);
}

View file

@ -2,7 +2,7 @@ use net2::TcpStreamExt;
use pallas_machines::primitives::Point;
use std::net::TcpStream;
use pallas_chainsync::{ClientConsumer, NoopStorage};
use pallas_chainsync::{ClientConsumer, NoopObserver};
use pallas_handshake::n2n::{Client, VersionTable};
use pallas_handshake::MAINNET_MAGIC;
use pallas_machines::run_agent;
@ -29,7 +29,7 @@ fn main() {
let cs_channel = muxer.use_channel(2);
let cs = ClientConsumer::initial(known_points, NoopStorage {});
let cs = ClientConsumer::initial(known_points, NoopObserver {});
let cs = run_agent(cs, cs_channel).unwrap();
println!("{:?}", cs);