mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Use proper messages for ValidatorSets/InInstructions pallet
Provides a DST, and associated metadata as beneficial. Also utilizes MuSig's context to session-bind. Since set_keys_messages also binds to set, this is semi-redundant, yet that's appreciated.
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
use scale::Encode;
|
||||
|
||||
use sp_core::Pair;
|
||||
|
||||
use serai_client::{
|
||||
primitives::insecure_pair_from_name,
|
||||
validator_sets::primitives::{Session, ValidatorSet},
|
||||
in_instructions::{
|
||||
primitives::{Batch, SignedBatch},
|
||||
primitives::{Batch, SignedBatch, batch_message},
|
||||
InInstructionsEvent,
|
||||
},
|
||||
Serai,
|
||||
@@ -32,7 +30,7 @@ pub async fn provide_batch(batch: Batch) -> [u8; 32] {
|
||||
|
||||
let block = publish_tx(&Serai::execute_batch(SignedBatch {
|
||||
batch: batch.clone(),
|
||||
signature: pair.sign(&batch.encode()),
|
||||
signature: pair.sign(&batch_message(&batch)),
|
||||
}))
|
||||
.await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user