diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-04-16 22:44:41 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-04-16 22:44:41 +0200 |
commit | 8af1a89e4cf00c8755f0214e213992d8ff328f5c (patch) | |
tree | 8f6e958b2da8940df9874b5c42e29f916131c2b1 /src/daemon | |
parent | Merge pull request #5439 (diff) | |
parent | daemon: fix ratio not being floating point (diff) | |
download | monero-8af1a89e4cf00c8755f0214e213992d8ff328f5c.tar.xz |
Merge pull request #5441
b3648232 daemon: fix ratio not being floating point (moneromooo-monero)
e1b097b9 core_rpc_server: remove dummy assigning int to bool (moneromooo-monero)
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/rpc_command_executor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index 5901be662..47c33b8f9 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -553,7 +553,7 @@ bool t_rpc_command_executor::mining_status() { if (!mining_busy && mres.active && mres.speed > 0 && mres.block_target > 0 && mres.difficulty > 0) { - double ratio = mres.speed * mres.block_target / mres.difficulty; + double ratio = mres.speed * mres.block_target / (double)mres.difficulty; uint64_t daily = 86400ull / mres.block_target * mres.block_reward * ratio; uint64_t monthly = 86400ull / mres.block_target * 30.5 * mres.block_reward * ratio; uint64_t yearly = 86400ull / mres.block_target * 356 * mres.block_reward * ratio; |