mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 22:18:53 +00:00
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)
This commit is contained in:
commit
8af1a89e4c
@ -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)
|
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 daily = 86400ull / mres.block_target * mres.block_reward * ratio;
|
||||||
uint64_t monthly = 86400ull / mres.block_target * 30.5 * 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;
|
uint64_t yearly = 86400ull / mres.block_target * 356 * mres.block_reward * ratio;
|
||||||
|
@ -1406,11 +1406,9 @@ namespace cryptonote
|
|||||||
submit_req.push_back(boost::value_initialized<std::string>());
|
submit_req.push_back(boost::value_initialized<std::string>());
|
||||||
res.height = m_core.get_blockchain_storage().get_current_blockchain_height();
|
res.height = m_core.get_blockchain_storage().get_current_blockchain_height();
|
||||||
|
|
||||||
bool r = CORE_RPC_STATUS_OK;
|
|
||||||
|
|
||||||
for(size_t i = 0; i < req.amount_of_blocks; i++)
|
for(size_t i = 0; i < req.amount_of_blocks; i++)
|
||||||
{
|
{
|
||||||
r = on_getblocktemplate(template_req, template_res, error_resp, ctx);
|
bool r = on_getblocktemplate(template_req, template_res, error_resp, ctx);
|
||||||
res.status = template_res.status;
|
res.status = template_res.status;
|
||||||
template_req.prev_block.clear();
|
template_req.prev_block.clear();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user