mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Fix clippy, update old dependencies
This commit is contained in:
@@ -51,8 +51,9 @@ hex = "0.4"
|
||||
|
||||
blake2 = "0.10"
|
||||
|
||||
dalek-ff-group = { path = "../../crypto/dalek-ff-group" }
|
||||
ciphersuite = { path = "../../crypto/ciphersuite" }
|
||||
dalek-ff-group = { path = "../../crypto/dalek-ff-group" }
|
||||
ciphersuite-kp256 = { path = "../../crypto/ciphersuite/kp256" }
|
||||
dkg-musig = { path = "../../crypto/dkg/musig" }
|
||||
frost = { package = "modular-frost", path = "../../crypto/frost", features = ["tests"] }
|
||||
schnorrkel = { path = "../../crypto/schnorrkel", package = "frost-schnorrkel" }
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
use core::{str::FromStr, fmt};
|
||||
|
||||
use scale::{Encode, Decode};
|
||||
|
||||
use dalek_ff_group::Ed25519;
|
||||
use ciphersuite::Ciphersuite;
|
||||
|
||||
|
||||
@@ -301,13 +301,13 @@ impl Serai {
|
||||
///
|
||||
/// The binding occurs at time of call. This does not track the latest finalized block and update
|
||||
/// itself.
|
||||
pub async fn as_of_latest_finalized_block(&self) -> Result<TemporalSerai, SeraiError> {
|
||||
pub async fn as_of_latest_finalized_block(&self) -> Result<TemporalSerai<'_>, SeraiError> {
|
||||
let latest = self.latest_finalized_block_hash().await?;
|
||||
Ok(TemporalSerai { serai: self, block: latest, events: RwLock::new(None) })
|
||||
}
|
||||
|
||||
/// Returns a TemporalSerai able to retrieve state as of the specified block.
|
||||
pub fn as_of(&self, block: [u8; 32]) -> TemporalSerai {
|
||||
pub fn as_of(&self, block: [u8; 32]) -> TemporalSerai<'_> {
|
||||
TemporalSerai { serai: self, block, events: RwLock::new(None) }
|
||||
}
|
||||
|
||||
@@ -424,11 +424,11 @@ impl TemporalSerai<'_> {
|
||||
SeraiValidatorSets(self)
|
||||
}
|
||||
|
||||
pub fn genesis_liquidity(&self) -> SeraiGenesisLiquidity {
|
||||
pub fn genesis_liquidity(&self) -> SeraiGenesisLiquidity<'_> {
|
||||
SeraiGenesisLiquidity(self)
|
||||
}
|
||||
|
||||
pub fn liquidity_tokens(&self) -> SeraiLiquidityTokens {
|
||||
pub fn liquidity_tokens(&self) -> SeraiLiquidityTokens<'_> {
|
||||
SeraiLiquidityTokens(self)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ async fn set_values(serai: &Serai, values: &Values) {
|
||||
frost::tests::algorithm_machines(
|
||||
&mut OsRng,
|
||||
&Schnorrkel::new(b"substrate"),
|
||||
&HashMap::from([(threshold_keys.params().i(), threshold_keys.into())]),
|
||||
&HashMap::from([(threshold_keys.params().i(), threshold_keys)]),
|
||||
),
|
||||
&oraclize_values_message(&set, values),
|
||||
);
|
||||
|
||||
@@ -55,8 +55,8 @@ pub async fn set_keys(
|
||||
}
|
||||
|
||||
let mut musig_keys = HashMap::new();
|
||||
for tk in threshold_keys {
|
||||
musig_keys.insert(tk.params().i(), tk.into());
|
||||
for threshold_keys in threshold_keys {
|
||||
musig_keys.insert(threshold_keys.params().i(), threshold_keys);
|
||||
}
|
||||
|
||||
let sig = frost::tests::sign_without_caching(
|
||||
|
||||
@@ -5,8 +5,10 @@ use zeroize::Zeroizing;
|
||||
|
||||
use ciphersuite::{
|
||||
group::{ff::Field, GroupEncoding},
|
||||
Ciphersuite, Ed25519, Secp256k1,
|
||||
Ciphersuite,
|
||||
};
|
||||
use dalek_ff_group::Ed25519;
|
||||
use ciphersuite_kp256::Secp256k1;
|
||||
|
||||
use sp_core::{
|
||||
Pair as PairTrait,
|
||||
@@ -67,7 +69,7 @@ async fn test_external_address(serai: Serai) {
|
||||
set_network_keys::<Secp256k1>(
|
||||
&serai,
|
||||
ExternalValidatorSet { session: Session(0), network },
|
||||
&[pair.clone()],
|
||||
core::slice::from_ref(&pair),
|
||||
)
|
||||
.await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user