mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
* Remove NetworkId from processor-messages Because intent binds to the sender/receiver, it's not needed for intent. The processor knows what the network is. The coordinator knows which to use because it's sending this message to the processor for that network. Also removes the unused zeroize. * ProcessorMessage::Completed use Session instead of key * Move SubstrateSignId to Session * Finish replacing key with session
This commit is contained in:
@@ -13,7 +13,7 @@ use sp_application_crypto::{RuntimePublic, sr25519::Public};
|
||||
|
||||
use serai_db::{DbTxn, Db, MemDb};
|
||||
|
||||
use serai_client::primitives::*;
|
||||
use serai_client::{primitives::*, validator_sets::primitives::Session};
|
||||
|
||||
use messages::coordinator::*;
|
||||
use crate::cosigner::Cosigner;
|
||||
@@ -28,7 +28,7 @@ async fn test_cosigner() {
|
||||
let block = [0xaa; 32];
|
||||
|
||||
let actual_id = SubstrateSignId {
|
||||
key: keys.values().next().unwrap().group_key().to_bytes(),
|
||||
session: Session(0),
|
||||
id: SubstrateSignableId::CosigningSubstrateBlock(block),
|
||||
attempt: (OsRng.next_u64() >> 32).try_into().unwrap(),
|
||||
};
|
||||
@@ -55,7 +55,8 @@ async fn test_cosigner() {
|
||||
let mut db = MemDb::new();
|
||||
let mut txn = db.txn();
|
||||
let (signer, preprocess) =
|
||||
Cosigner::new(&mut txn, vec![keys], block_number, block, actual_id.attempt).unwrap();
|
||||
Cosigner::new(&mut txn, Session(0), vec![keys], block_number, block, actual_id.attempt)
|
||||
.unwrap();
|
||||
|
||||
match preprocess {
|
||||
// All participants should emit a preprocess
|
||||
|
||||
Reference in New Issue
Block a user