mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Give one weight per key share to validators in Tributary
This commit is contained in:
@@ -51,16 +51,15 @@ impl TributarySpec {
|
||||
serai_block: [u8; 32],
|
||||
start_time: u64,
|
||||
set: ValidatorSet,
|
||||
set_participants: Vec<PublicKey>,
|
||||
set_participants: Vec<(PublicKey, u64)>,
|
||||
) -> TributarySpec {
|
||||
let mut validators = vec![];
|
||||
for participant in set_participants {
|
||||
for (participant, shares) in set_participants {
|
||||
// TODO: Ban invalid keys from being validators on the Serai side
|
||||
// (make coordinator key a session key?)
|
||||
let participant = <Ristretto as Ciphersuite>::read_G::<&[u8]>(&mut participant.0.as_ref())
|
||||
.expect("invalid key registered as participant");
|
||||
// TODO: Give one weight on Tributary per bond instance
|
||||
validators.push((participant, 1));
|
||||
validators.push((participant, shares));
|
||||
}
|
||||
|
||||
Self { serai_block, start_time, set, validators }
|
||||
|
||||
Reference in New Issue
Block a user