mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-02 02:20:00 -07:00
parser: trying to fix ratio smas
This commit is contained in:
@@ -652,7 +652,11 @@ where
|
||||
})
|
||||
.into();
|
||||
|
||||
let last_value = f32::lossy_from(source.get_or_import(&height));
|
||||
let mut last_value = f32::lossy_from(source.get_or_import(&height));
|
||||
|
||||
if last_value.is_nan() {
|
||||
last_value = 0.0;
|
||||
}
|
||||
|
||||
average.replace(
|
||||
((previous_average * (block_time as f32 - 1.0) + last_value) / block_time as f32)
|
||||
|
||||
Reference in New Issue
Block a user