Fixes for prior commit

This commit is contained in:
Luke Parker 2023-11-22 16:24:50 -05:00
parent 08e6669403
commit 88a1726399
No known key found for this signature in database
6 changed files with 30 additions and 46 deletions

View file

@ -318,7 +318,6 @@ async fn dkg_test() {
let spec = spec.clone();
let key_pair = key_pair.clone();
async move {
let tx = tx.0;
// Version, Pallet, Call, Network, Key Pair, Signature
let expected_len = 1 + 1 + 1 + 1 + 32 + 1 + key_pair.1.len() + 64;
// It's length prefixed

View file

@ -10,7 +10,6 @@ use scale::{Encode, Decode};
use serai_client::{
Public, Signature,
validator_sets::primitives::{ValidatorSet, KeyPair},
subxt::utils::Encoded,
SeraiValidatorSets,
};
@ -138,7 +137,7 @@ pub(crate) async fn handle_application_tx<
D: Db,
Pro: Processors,
FPst: Future<Output = ()>,
PST: Clone + Fn(ValidatorSet, Encoded) -> FPst,
PST: Clone + Fn(ValidatorSet, Vec<u8>) -> FPst,
FRid: Future<Output = ()>,
RID: RIDTrait<FRid>,
>(

View file

@ -8,7 +8,7 @@ use ciphersuite::{Ciphersuite, Ristretto};
use tokio::sync::broadcast;
use scale::{Encode, Decode};
use serai_client::{validator_sets::primitives::ValidatorSet, subxt::utils::Encoded, Serai};
use serai_client::{validator_sets::primitives::ValidatorSet, Serai};
use serai_db::DbTxn;
@ -48,7 +48,7 @@ async fn handle_block<
D: Db,
Pro: Processors,
FPst: Future<Output = ()>,
PST: Clone + Fn(ValidatorSet, Encoded) -> FPst,
PST: Clone + Fn(ValidatorSet, Vec<u8>) -> FPst,
FRid: Future<Output = ()>,
RID: RIDTrait<FRid>,
P: P2p,
@ -134,7 +134,7 @@ pub(crate) async fn handle_new_blocks<
D: Db,
Pro: Processors,
FPst: Future<Output = ()>,
PST: Clone + Fn(ValidatorSet, Encoded) -> FPst,
PST: Clone + Fn(ValidatorSet, Vec<u8>) -> FPst,
FRid: Future<Output = ()>,
RID: RIDTrait<FRid>,
P: P2p,

View file

@ -1,3 +1,5 @@
use core::ops::Deref;
use thiserror::Error;
use futures::stream::{Stream, StreamExt};

View file

@ -210,16 +210,12 @@ async fn sign_test() {
// Fund the new account to pay for fees
let balance = Balance { coin: Coin::Serai, amount: Amount(1_000_000_000) };
serai
.publish(
&serai
.sign(
.publish(&serai.sign(
&PairSigner::new(insecure_pair_from_name("Ferdie")),
&SeraiCoins::transfer(address, balance),
0,
Default::default(),
)
.unwrap(),
)
))
.await
.unwrap();
@ -275,16 +271,12 @@ async fn sign_test() {
},
};
serai
.publish(
&serai
.sign(
.publish(&serai.sign(
&serai_pair,
&SeraiCoins::burn_with_instruction(out_instruction.clone()),
0,
Default::default(),
)
.unwrap(),
)
))
.await
.unwrap();

View file

@ -248,16 +248,12 @@ async fn mint_and_burn_test() {
// Fund the new account to pay for fees
let balance = Balance { coin: Coin::Serai, amount: Amount(1_000_000_000) };
serai
.publish(
&serai
.sign(
.publish(&serai.sign(
&PairSigner::new(insecure_pair_from_name("Ferdie")),
&SeraiCoins::transfer(address, balance),
0,
Default::default(),
)
.unwrap(),
)
))
.await
.unwrap();
@ -506,16 +502,12 @@ async fn mint_and_burn_test() {
};
serai
.publish(
&serai
.sign(
.publish(&serai.sign(
serai_pair,
&SeraiCoins::burn_with_instruction(out_instruction),
nonce,
Default::default(),
)
.unwrap(),
)
))
.await
.unwrap();
}