From 99970371cf81684e39f0807a50495ef3c0b38461 Mon Sep 17 00:00:00 2001 From: buffalu <85544055+buffalu@users.noreply.github.com> Date: Fri, 8 Nov 2024 07:42:29 -0600 Subject: [PATCH] Add packet flag for staked node (#705) --- core/benches/proto_to_packet.rs | 1 + core/src/lib.rs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/core/benches/proto_to_packet.rs b/core/benches/proto_to_packet.rs index 87f85f9c7f..1727d8af9c 100644 --- a/core/benches/proto_to_packet.rs +++ b/core/benches/proto_to_packet.rs @@ -25,6 +25,7 @@ fn get_proto_packet(i: u8) -> PbPacket { repair: false, simple_vote_tx: false, tracer_packet: false, + from_staked_node: false, }), sender_stake: 0, }), diff --git a/core/src/lib.rs b/core/src/lib.rs index d4c2879f73..65456c43ba 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -105,6 +105,12 @@ pub fn proto_packet_to_packet(p: jito_protos::proto::packet::Packet) -> Packet { if flags.repair { packet.meta_mut().flags.insert(PacketFlags::REPAIR); } + if flags.from_staked_node { + packet + .meta_mut() + .flags + .insert(PacketFlags::FROM_STAKED_NODE); + } } } packet