mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Use an actual, cryptographically-binding ID for batches in SignId
The intent system expected one.
This commit is contained in:
@@ -25,11 +25,9 @@ async fn test_substrate_signer() {
|
||||
let participant_one = Participant::new(1).unwrap();
|
||||
|
||||
let id: u32 = 5;
|
||||
let mut id_arr = [0u8; 32];
|
||||
id_arr[.. 4].copy_from_slice(&id.to_le_bytes());
|
||||
let block = BlockHash([0xaa; 32]);
|
||||
let actual_id =
|
||||
SignId { key: keys[&participant_one].group_key().to_bytes().to_vec(), id: id_arr, attempt: 0 };
|
||||
let mut actual_id =
|
||||
SignId { key: keys[&participant_one].group_key().to_bytes().to_vec(), id: [0; 32], attempt: 0 };
|
||||
|
||||
let batch = Batch {
|
||||
network: NetworkId::Monero,
|
||||
@@ -88,6 +86,9 @@ async fn test_substrate_signer() {
|
||||
preprocess,
|
||||
}) = signers.get_mut(&i).unwrap().events.pop_front().unwrap()
|
||||
{
|
||||
if actual_id.id == [0; 32] {
|
||||
actual_id.id = id.id;
|
||||
}
|
||||
assert_eq!(id, actual_id);
|
||||
assert_eq!(batch_block, block);
|
||||
if signing_set.contains(&i) {
|
||||
|
||||
Reference in New Issue
Block a user