Skip to content

Commit

Permalink
Update frozen_abi digest
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Jan 11, 2023
1 parent 28a0c38 commit 552d13d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions frozen-abi/src/abi_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,12 @@ impl AbiExample for SocketAddr {
}
}

impl AbiExample for IpAddr {
fn example() -> Self {
IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0))
}
}

// This is a control flow indirection needed for digesting all variants of an enum
pub trait AbiEnumVisitor: Serialize {
fn visit_for_abi(&self, digester: &mut AbiDigester) -> DigestResult;
Expand Down
2 changes: 1 addition & 1 deletion gossip/src/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ pub fn make_accounts_hashes_message(
pub(crate) type Ping = ping_pong::Ping<[u8; GOSSIP_PING_TOKEN_SIZE]>;

// TODO These messages should go through the gpu pipeline for spam filtering
#[frozen_abi(digest = "Hsj6a2bmzxno1RUcSM1gzHAg2zxgw15E3feb2SimieBA")]
#[frozen_abi(digest = "B52ZEhM7hXGk8MzKuoPRG8xCQZ2cBANrhoBHaurnQ58u")]
#[derive(Serialize, Deserialize, Debug, AbiEnumVisitor, AbiExample)]
#[allow(clippy::large_enum_variant)]
pub(crate) enum Protocol {
Expand Down
2 changes: 1 addition & 1 deletion gossip/src/contact_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const SOCKET_TAG_TPU_VOTE: u8 = 0x07u8;
const SOCKET_TAG_TVU: u8 = 0x08u8;
const SOCKET_TAG_TVU_FORWARDS: u8 = 0x09u8;

#[derive(Clone, Debug, Default, Eq, PartialEq)]
#[derive(Clone, Debug, Default, Eq, PartialEq, AbiExample)]
pub struct ContactInfo {
pubkey: Pubkey,
wallclock: u64,
Expand Down

0 comments on commit 552d13d

Please sign in to comment.