From 1ded27995ccb19038c065af792edffa7da321b72 Mon Sep 17 00:00:00 2001 From: Cyrix126 Date: Fri, 1 Nov 2024 01:36:33 +0100 Subject: [PATCH] feat: algo better output of calculation in logs --- src/helper/xvb/algorithm.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helper/xvb/algorithm.rs b/src/helper/xvb/algorithm.rs index b9d61dd..3a1910d 100644 --- a/src/helper/xvb/algorithm.rs +++ b/src/helper/xvb/algorithm.rs @@ -197,7 +197,8 @@ impl<'a> Algorithm<'a> { stats, }; // external XvB HR is taken into account with get_target_donation_hashrate so the needed time is calculating how much time is needed from local sparable HR only - new_instance.stats.target_donation_hashrate = new_instance.get_target_donation_hashrate(); + new_instance.stats.target_donation_hashrate = + new_instance.get_target_donation_hashrate().max(0.0); new_instance.stats.needed_time_xvb = Self::get_needed_time_xvb( new_instance.stats.target_donation_hashrate, new_instance.stats.hashrate_xmrig,