Skip to content

Commit

Permalink
refactor(network): split bearer into read / write parts
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Dec 18, 2023
1 parent 408a41a commit d0745ff
Show file tree
Hide file tree
Showing 2 changed files with 168 additions and 159 deletions.
6 changes: 3 additions & 3 deletions examples/n2n-miniprotocols/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async fn do_chainsync(peer: &mut PeerClient) {

info!("intersected point is {:?}", point);

for _ in 0..10 {
for _ in 0..100 {
let next = peer.chainsync().request_next().await.unwrap();

match next {
Expand All @@ -59,12 +59,12 @@ async fn main() {

// setup a TCP socket to act as data bearer between our agents and the remote
// relay.
let mut peer = PeerClient::connect("relays-new.cardano-mainnet.iohk.io:3001", MAINNET_MAGIC)
let mut peer = PeerClient::connect("localhost:3000", MAINNET_MAGIC)
.await
.unwrap();

// fetch an arbitrary batch of block
do_blockfetch(&mut peer).await;
//do_blockfetch(&mut peer).await;

// execute the chainsync flow from an arbitrary point in the chain
do_chainsync(&mut peer).await;
Expand Down
Loading

0 comments on commit d0745ff

Please sign in to comment.