mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Block contructor and tests
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use core::fmt::Debug;
|
||||
use std::{
|
||||
io,
|
||||
collections::{HashSet, HashMap},
|
||||
@@ -65,8 +66,11 @@ pub enum TransactionKind {
|
||||
Signed(Signed),
|
||||
}
|
||||
|
||||
pub trait Transaction: Send + Sync + Clone + Eq + ReadWrite {
|
||||
pub trait Transaction: Send + Sync + Clone + Eq + Debug + ReadWrite {
|
||||
fn kind(&self) -> TransactionKind;
|
||||
/// Return the hash of this transaction.
|
||||
///
|
||||
/// The hash must NOT commit to the signature.
|
||||
fn hash(&self) -> [u8; 32];
|
||||
|
||||
fn verify(&self) -> Result<(), TransactionError>;
|
||||
|
||||
Reference in New Issue
Block a user