mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Use an enum for Coin/NetworkId
It originally wasn't an enum so software which had yet to update before an integration wouldn't error (as now enums are strictly typed). The strict typing is preferable though.
This commit is contained in:
@@ -11,7 +11,7 @@ use serai_db::{DbTxn, Db, MemDb};
|
||||
|
||||
use sp_application_crypto::sr25519;
|
||||
use serai_client::{
|
||||
primitives::{MONERO_NET_ID, BlockHash},
|
||||
primitives::{BlockHash, NetworkId},
|
||||
validator_sets::primitives::{Session, ValidatorSet},
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::{
|
||||
};
|
||||
|
||||
const ID: KeyGenId =
|
||||
KeyGenId { set: ValidatorSet { session: Session(1), network: MONERO_NET_ID }, attempt: 3 };
|
||||
KeyGenId { set: ValidatorSet { session: Session(1), network: NetworkId::Monero }, attempt: 3 };
|
||||
|
||||
pub async fn test_key_gen<C: Coin>() {
|
||||
let mut entropies = HashMap::new();
|
||||
|
||||
Reference in New Issue
Block a user