mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 06:39:58 -07:00
global: snapshot
This commit is contained in:
@@ -297,7 +297,7 @@ impl CostBasisFenwick {
|
||||
if total <= 0 {
|
||||
0
|
||||
} else {
|
||||
(range as f64 / total as f64 * 10000.0) as u16
|
||||
(range as f64 / total as f64 * 10000.0).round() as u16
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -461,4 +461,34 @@ impl RealizedState {
|
||||
}
|
||||
Cents::new((self.peak_regret_raw / Sats::ONE_BTC_U128) as u64)
|
||||
}
|
||||
|
||||
/// Raw profit value created for lossless aggregation.
|
||||
#[inline]
|
||||
pub(crate) fn profit_value_created_raw(&self) -> u128 {
|
||||
self.profit_value_created_raw
|
||||
}
|
||||
|
||||
/// Raw profit value destroyed for lossless aggregation.
|
||||
#[inline]
|
||||
pub(crate) fn profit_value_destroyed_raw(&self) -> u128 {
|
||||
self.profit_value_destroyed_raw
|
||||
}
|
||||
|
||||
/// Raw loss value created for lossless aggregation.
|
||||
#[inline]
|
||||
pub(crate) fn loss_value_created_raw(&self) -> u128 {
|
||||
self.loss_value_created_raw
|
||||
}
|
||||
|
||||
/// Raw loss value destroyed for lossless aggregation.
|
||||
#[inline]
|
||||
pub(crate) fn loss_value_destroyed_raw(&self) -> u128 {
|
||||
self.loss_value_destroyed_raw
|
||||
}
|
||||
|
||||
/// Raw peak regret for lossless aggregation.
|
||||
#[inline]
|
||||
pub(crate) fn peak_regret_raw(&self) -> u128 {
|
||||
self.peak_regret_raw
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user