add specific network/coin/balance types (#619)

* add specific network/coin/balance types

* misc fixes

* fix clippy

* misc fixes

* fix pr comments

* Make halting for external networks

* fix encode/decode
This commit is contained in:
akildemir
2024-10-07 05:16:11 +03:00
committed by GitHub
parent d7ecab605e
commit 435f1d9ae1
91 changed files with 1536 additions and 1055 deletions

View File

@@ -17,7 +17,7 @@ use frost_schnorrkel::Schnorrkel;
use log::{info, debug, warn};
use serai_client::{
primitives::{NetworkId, BlockHash},
primitives::{ExternalNetworkId, BlockHash},
in_instructions::primitives::{Batch, SignedBatch, batch_message},
validator_sets::primitives::Session,
};
@@ -41,7 +41,7 @@ type SignatureShare = <AlgorithmSignMachine<Ristretto, Schnorrkel> as SignMachin
pub struct BatchSigner<D: Db> {
db: PhantomData<D>,
network: NetworkId,
network: ExternalNetworkId,
session: Session,
keys: Vec<ThresholdKeys<Ristretto>>,
@@ -65,7 +65,7 @@ impl<D: Db> fmt::Debug for BatchSigner<D> {
impl<D: Db> BatchSigner<D> {
pub fn new(
network: NetworkId,
network: ExternalNetworkId,
session: Session,
keys: Vec<ThresholdKeys<Ristretto>>,
) -> BatchSigner<D> {