mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Update all of serai-coordinator to compile with the new serai-client-serai
This commit is contained in:
@@ -3,11 +3,13 @@ use std::{sync::Arc, collections::HashMap};
|
||||
|
||||
use blake2::{Digest, Blake2b256};
|
||||
|
||||
use serai_abi::primitives::{
|
||||
balance::Amount, validator_sets::ExternalValidatorSet, address::SeraiAddress,
|
||||
merkle::IncrementalUnbalancedMerkleTree,
|
||||
use serai_client_serai::{
|
||||
abi::primitives::{
|
||||
balance::Amount, validator_sets::ExternalValidatorSet, address::SeraiAddress,
|
||||
merkle::IncrementalUnbalancedMerkleTree,
|
||||
},
|
||||
Serai,
|
||||
};
|
||||
use serai_client_serai::Serai;
|
||||
|
||||
use serai_db::*;
|
||||
use serai_task::ContinuallyRan;
|
||||
@@ -85,7 +87,7 @@ impl<D: Db> ContinuallyRan for CosignIntendTask<D> {
|
||||
|
||||
// Check we are indexing a linear chain
|
||||
if block.header.builds_upon() !=
|
||||
builds_upon.clone().calculate(serai_abi::BLOCK_HEADER_BRANCH_TAG)
|
||||
builds_upon.clone().calculate(serai_client_serai::abi::BLOCK_HEADER_BRANCH_TAG)
|
||||
{
|
||||
Err(format!(
|
||||
"node's block #{block_number} doesn't build upon the block #{} prior indexed",
|
||||
@@ -95,8 +97,8 @@ impl<D: Db> ContinuallyRan for CosignIntendTask<D> {
|
||||
let block_hash = block.header.hash();
|
||||
SubstrateBlockHash::set(&mut txn, block_number, &block_hash);
|
||||
builds_upon.append(
|
||||
serai_abi::BLOCK_HEADER_BRANCH_TAG,
|
||||
Blake2b256::new_with_prefix([serai_abi::BLOCK_HEADER_LEAF_TAG])
|
||||
serai_client_serai::abi::BLOCK_HEADER_BRANCH_TAG,
|
||||
Blake2b256::new_with_prefix([serai_client_serai::abi::BLOCK_HEADER_LEAF_TAG])
|
||||
.chain_update(block_hash.0)
|
||||
.finalize()
|
||||
.into(),
|
||||
|
||||
@@ -9,22 +9,24 @@ use blake2::{Digest, Blake2s256};
|
||||
|
||||
use borsh::{BorshSerialize, BorshDeserialize};
|
||||
|
||||
use serai_abi::{
|
||||
primitives::{
|
||||
BlockHash,
|
||||
crypto::{Public, KeyPair},
|
||||
network_id::ExternalNetworkId,
|
||||
validator_sets::{Session, ExternalValidatorSet},
|
||||
address::SeraiAddress,
|
||||
use serai_client_serai::{
|
||||
abi::{
|
||||
primitives::{
|
||||
BlockHash,
|
||||
crypto::{Public, KeyPair},
|
||||
network_id::ExternalNetworkId,
|
||||
validator_sets::{Session, ExternalValidatorSet},
|
||||
address::SeraiAddress,
|
||||
},
|
||||
Block,
|
||||
},
|
||||
Block,
|
||||
Serai, TemporalSerai,
|
||||
};
|
||||
use serai_client_serai::{Serai, TemporalSerai};
|
||||
|
||||
use serai_db::*;
|
||||
use serai_task::*;
|
||||
|
||||
use serai_cosign_types::*;
|
||||
pub use serai_cosign_types::*;
|
||||
|
||||
/// The cosigns which are intended to be performed.
|
||||
mod intend;
|
||||
|
||||
Reference in New Issue
Block a user