Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions polybase/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,19 @@ async fn main() -> Result<()> {
}

NetworkEvent::Accept { accept } => {
if snapshot_from.is_some() {
continue;
}

info!(height = &accept.height, skips = &accept.skips, from = &from_peer_id.prefix(), leader = &accept.leader_id.prefix(), hash = accept.proposal_hash.to_string(), local_height = solid.height(), "Received accept");
solid.receive_accept(&accept, &from_peer_id);
}

NetworkEvent::Proposal { manifest } => {
if snapshot_from.is_some() {
continue;
}

info!(height = &manifest.height, skips = &manifest.skips, from = &from_peer_id.prefix(), leader = &manifest.leader_id.prefix(), hash = &manifest.hash().to_string(), "Received proposal");

// Lease the proposal changes
Expand All @@ -463,6 +471,10 @@ async fn main() -> Result<()> {
}

NetworkEvent::Txn { txn } => {
if snapshot_from.is_some() {
continue;
}

info!(collection = &txn.collection_id, "Received txn");
match db.add_txn(txn).await {
Ok(_) => (),
Expand Down
4 changes: 2 additions & 2 deletions polybase/src/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ impl Network {
}
match swarm.behaviour_mut().rr.send_response(channel, protocol::Response) {
Ok(_) => {},
Err(_) => {
error!(peer_id = ?peer, "Failed to send response");
Err(err) => {
error!(peer_id = ?peer, "Failed to send response: {:?}", err);
}
}
}
Expand Down