Skip to content

Commit

Permalink
fix: crawler and synth node
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaslong committed May 9, 2022
1 parent 354e2d6 commit 9690175
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .crawler/src/crawler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl Reading for Crawler {
self.process_peer_request(source)?;
Ok(())
}
ClientMessage::PeerResponse(peer_ips) => {
ClientMessage::PeerResponse(peer_ips, _) => {
self.process_peer_response(source, peer_ips)?;
Ok(())
}
Expand Down Expand Up @@ -342,7 +342,7 @@ impl Crawler {
.choose_multiple(&mut self.rng(), SHARED_PEER_COUNT);

debug!(parent: self.node().span(), "sending a PeerResponse to {}", source);
self.send_direct_message(source, ClientMessage::PeerResponse(peers))?;
self.send_direct_message(source, ClientMessage::PeerResponse(peers, None))?;

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions .integration/src/test_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl Reading for TestNode {
debug!("Peer {} disconnected for the following reason: {:?}", source, reason);
}
ClientMessage::PeerRequest => self.process_peer_request(source).await?,
ClientMessage::PeerResponse(peer_addrs) => self.process_peer_response(source, peer_addrs).await?,
ClientMessage::PeerResponse(peer_addrs, _) => self.process_peer_response(source, peer_addrs).await?,
ClientMessage::Ping(version, _fork_depth, _peer_type, _peer_state, _block_hash, block_header) => {
// Deserialise the block header.
let block_header = block_header.deserialize().await.unwrap();
Expand All @@ -176,7 +176,7 @@ impl Reading for TestNode {
impl TestNode {
async fn process_peer_request(&self, source: SocketAddr) -> io::Result<()> {
let peers = self.state.peers.read().keys().copied().collect::<Vec<_>>();
let msg = ClientMessage::PeerResponse(peers);
let msg = ClientMessage::PeerResponse(peers, None);
info!(parent: self.node().span(), "sending a PeerResponse to {}", source);

self.send_direct_message(source, msg)?;
Expand Down

0 comments on commit 9690175

Please sign in to comment.