mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Add dedicated BatchSignId
This commit is contained in:
@@ -23,7 +23,7 @@ use serai_client::{
|
||||
InInstructionsEvent,
|
||||
},
|
||||
};
|
||||
use messages::{sign::SignId, SubstrateContext, CoordinatorMessage};
|
||||
use messages::{coordinator::BatchSignId, SubstrateContext, CoordinatorMessage};
|
||||
|
||||
use crate::{*, tests::*};
|
||||
|
||||
@@ -33,10 +33,10 @@ pub async fn batch(
|
||||
substrate_key: &Zeroizing<<Ristretto as Ciphersuite>::F>,
|
||||
batch: Batch,
|
||||
) -> u64 {
|
||||
let mut id = [0; 32];
|
||||
let mut id = [0; 5];
|
||||
OsRng.fill_bytes(&mut id);
|
||||
let id = SignId {
|
||||
key: (<Ristretto as Ciphersuite>::generator() * **substrate_key).to_bytes().to_vec(),
|
||||
let id = BatchSignId {
|
||||
key: (<Ristretto as Ciphersuite>::generator() * **substrate_key).to_bytes(),
|
||||
id,
|
||||
attempt: 0,
|
||||
};
|
||||
|
||||
@@ -89,7 +89,7 @@ pub async fn key_gen<C: Ciphersuite>(
|
||||
(
|
||||
participant_is[usize::from(l)],
|
||||
vec![
|
||||
u8::try_from(u16::try_from(participant_is[i]).unwrap()).unwrap(),
|
||||
u8::try_from(u16::from(participant_is[i])).unwrap(),
|
||||
u8::try_from(u16::from(participant_is[usize::from(l)])).unwrap(),
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user