Skip to content

Commit 0bf8b0d

Browse files
v3.0: ensure bricked gossip control account is offcurve (backport of #8300) (#8311)
* Gossip: brick gossip weight control key (#8256) brick gossip weight control key (cherry picked from commit 0e918ad) * ensure bricked gossip control account is offcurve (#8300) ensure bricked gossip control account is off curve (cherry picked from commit 75ee010) --------- Co-authored-by: Greg Cusack <[email protected]>
1 parent 065a2ca commit 0bf8b0d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

gossip/src/stake_weighting_config.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,16 @@ pub(crate) fn get_gossip_config_from_account(bank: &Bank) -> Option<WeightingCon
7878
.0;
7979
bincode::deserialize::<WeightingConfig>(data.data()).ok()
8080
}
81+
82+
#[cfg(test)]
83+
mod tests {
84+
use super::*;
85+
86+
#[test]
87+
fn control_pubkey_is_offcurve() {
88+
assert!(
89+
!weighting_config_control_pubkey::id().is_on_curve(),
90+
"weighting_config_control_pubkey must be an off-curve key"
91+
);
92+
}
93+
}

0 commit comments

Comments
 (0)