From df5ed0793bb3b8ccb2be95f86c199c3035730288 Mon Sep 17 00:00:00 2001 From: Hector Santos Date: Sat, 19 Oct 2024 15:40:57 +0200 Subject: [PATCH] add target on required put messages --- crates/core/src/node/network_bridge/p2p_protoc.rs | 2 +- crates/core/src/operations/put.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/core/src/node/network_bridge/p2p_protoc.rs b/crates/core/src/node/network_bridge/p2p_protoc.rs index 3d0e6932e..ff6bf2158 100644 --- a/crates/core/src/node/network_bridge/p2p_protoc.rs +++ b/crates/core/src/node/network_bridge/p2p_protoc.rs @@ -202,7 +202,7 @@ impl P2pConnManager { ConnEvent::OutboundMessage(msg) => { let Some(target_peer) = msg.target() else { let id = *msg.id(); - tracing::error!(%id, "Target peer not set, must be set for connection outbound message"); + tracing::error!(%id, %msg, "Target peer not set, must be set for connection outbound message"); self.bridge.op_manager.completed(id); continue; }; diff --git a/crates/core/src/operations/put.rs b/crates/core/src/operations/put.rs index 8b78eb2c1..6c15140ab 100644 --- a/crates/core/src/operations/put.rs +++ b/crates/core/src/operations/put.rs @@ -410,6 +410,7 @@ impl Operation for PutOp { htl, sender, skip_list, + .. } => { let key = contract.key(); let peer_loc = op_manager.ring.connection_manager.own_location(); @@ -790,6 +791,7 @@ where (PutMsg::PutForward { id, sender: own_pkloc, + target: peer.clone(), contract: contract.clone(), new_value: new_value.clone(), htl, @@ -830,6 +832,7 @@ mod messages { PutForward { id: Transaction, sender: PeerKeyLocation, + target: PeerKeyLocation, contract: ContractContainer, new_value: WrappedState, /// current htl, reduced by one at each hop @@ -895,6 +898,8 @@ mod messages { Self::SeekNode { target, .. } => Some(target), Self::RequestPut { target, .. } => Some(target), Self::SuccessfulPut { target, .. } => Some(target), + Self::PutForward { target, .. } => Some(target), + Self::BroadcastTo { target, .. } => Some(target), _ => None, } }