mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Flesh out report task
This commit is contained in:
@@ -6,12 +6,13 @@ use crate::{Id, Address, ReceivedOutput};
|
||||
|
||||
/// A block header from an external network.
|
||||
pub trait BlockHeader: Send + Sync + Sized + Clone + Debug {
|
||||
/// The type used to identify blocks.
|
||||
type Id: 'static + Id;
|
||||
/// The ID of this block.
|
||||
fn id(&self) -> Self::Id;
|
||||
///
|
||||
/// This is fixed to 32-bytes and is expected to be cryptographically binding with 128-bit
|
||||
/// security. This is not required to be the ID used natively by the external network.
|
||||
fn id(&self) -> [u8; 32];
|
||||
/// The ID of the parent block.
|
||||
fn parent(&self) -> Self::Id;
|
||||
fn parent(&self) -> [u8; 32];
|
||||
}
|
||||
|
||||
/// A block from an external network.
|
||||
@@ -33,7 +34,7 @@ pub trait Block: Send + Sync + Sized + Clone + Debug {
|
||||
type Output: ReceivedOutput<Self::Key, Self::Address>;
|
||||
|
||||
/// The ID of this block.
|
||||
fn id(&self) -> <Self::Header as BlockHeader>::Id;
|
||||
fn id(&self) -> [u8; 32];
|
||||
|
||||
/// Scan all outputs within this block to find the outputs spendable by this key.
|
||||
fn scan_for_outputs(&self, key: Self::Key) -> Vec<Self::Output>;
|
||||
|
||||
Reference in New Issue
Block a user