mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Correct compilation errors
This commit is contained in:
@@ -2,7 +2,7 @@ use core::fmt::Debug;
|
||||
|
||||
use group::{Group, GroupEncoding};
|
||||
|
||||
use crate::{Id, ReceivedOutput};
|
||||
use crate::{Id, Address, ReceivedOutput};
|
||||
|
||||
/// A block header from an external network.
|
||||
pub trait BlockHeader: Send + Sync + Sized + Clone + Debug {
|
||||
@@ -28,7 +28,7 @@ pub trait Block: Send + Sync + Sized + Clone + Debug {
|
||||
/// The type used to represent keys on this external network.
|
||||
type Key: Group + GroupEncoding;
|
||||
/// The type used to represent addresses on this external network.
|
||||
type Address;
|
||||
type Address: Address;
|
||||
/// The type used to represent received outputs on this external network.
|
||||
type Output: ReceivedOutput<Self::Key, Self::Address>;
|
||||
|
||||
|
||||
@@ -3,10 +3,13 @@ use std::io;
|
||||
|
||||
use group::GroupEncoding;
|
||||
|
||||
use serai_primitives::Balance;
|
||||
use serai_primitives::{ExternalAddress, Balance};
|
||||
|
||||
use crate::Id;
|
||||
|
||||
/// An address on the external network.
|
||||
pub trait Address: Send + Sync + TryFrom<ExternalAddress> {}
|
||||
|
||||
/// The type of the output.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||
pub enum OutputType {
|
||||
@@ -81,7 +84,7 @@ impl OutputType {
|
||||
}
|
||||
|
||||
/// A received output.
|
||||
pub trait ReceivedOutput<K: GroupEncoding, A>:
|
||||
pub trait ReceivedOutput<K: GroupEncoding, A: Address>:
|
||||
Send + Sync + Sized + Clone + PartialEq + Eq + Debug
|
||||
{
|
||||
/// The type used to identify this output.
|
||||
|
||||
Reference in New Issue
Block a user