mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-06 20:29:10 -07:00
computer: store part 6
This commit is contained in:
@@ -19,16 +19,13 @@ impl AddressData {
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn is_empty(&self) -> bool {
|
||||
if self.amount() == Sats::ZERO {
|
||||
if self.outputs_len != 0 {
|
||||
unreachable!();
|
||||
}
|
||||
pub fn has_0_sats(&self) -> bool {
|
||||
self.amount() == Sats::ZERO
|
||||
}
|
||||
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
#[inline(always)]
|
||||
pub fn has_0_utxos(&self) -> bool {
|
||||
self.outputs_len == 0
|
||||
}
|
||||
|
||||
pub fn receive(&mut self, amount: Sats, price: Option<Dollars>) {
|
||||
|
||||
@@ -75,6 +75,10 @@ impl Timestamp {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_more_than_hour(&self) -> bool {
|
||||
jiff::Timestamp::from(*self).as_second() >= 60 * 60
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u32> for Timestamp {
|
||||
|
||||
Reference in New Issue
Block a user