Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add target on required put messages #1270

Merged
merged 1 commit into from
Oct 19, 2024
Merged
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
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
Loading