mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 20:59:23 +00:00
Resolve #245
This commit is contained in:
@@ -197,6 +197,13 @@ impl BlockTrait<Bitcoin> for Block {
|
||||
hash.reverse();
|
||||
hash
|
||||
}
|
||||
|
||||
fn parent(&self) -> Self::Id {
|
||||
let mut hash = *self.header.prev_blockhash.as_raw_hash().as_byte_array();
|
||||
hash.reverse();
|
||||
hash
|
||||
}
|
||||
|
||||
fn median_fee(&self) -> Fee {
|
||||
// TODO
|
||||
Fee(20)
|
||||
|
||||
@@ -175,6 +175,7 @@ pub trait Block<C: Coin>: Send + Sync + Sized + Clone + Debug {
|
||||
// This is currently bounded to being 32-bytes.
|
||||
type Id: 'static + Id;
|
||||
fn id(&self) -> Self::Id;
|
||||
fn parent(&self) -> Self::Id;
|
||||
fn median_fee(&self) -> C::Fee;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,10 @@ impl BlockTrait<Monero> for Block {
|
||||
self.0
|
||||
}
|
||||
|
||||
fn parent(&self) -> Self::Id {
|
||||
self.1.header.previous
|
||||
}
|
||||
|
||||
fn median_fee(&self) -> Fee {
|
||||
// TODO
|
||||
Fee { per_weight: 80000, mask: 10000 }
|
||||
|
||||
Reference in New Issue
Block a user