Skip to content

Commit

Permalink
add target on required put messages
Browse files Browse the repository at this point in the history
  • Loading branch information
netsirius committed Oct 19, 2024
1 parent cdd1dfa commit df5ed07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/core/src/node/network_bridge/p2p_protoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
5 changes: 5 additions & 0 deletions crates/core/src/operations/put.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -790,6 +791,7 @@ where
(PutMsg::PutForward {
id,
sender: own_pkloc,
target: peer.clone(),
contract: contract.clone(),
new_value: new_value.clone(),
htl,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
}
}
Expand Down

0 comments on commit df5ed07

Please sign in to comment.