Skip to content

[Bug][RPC][Mining] The network hashrate returned by getmininginfo rpc is wrong #1018

@us77ipis

Description

@us77ipis

The problem is that the function that should return the network hashrate for one of the three mining algos, calculates the average hashrate using the nChainWork "Total amount of work (expected number of hashes) in the chain up to and including this block" which includes the work of all three algos and if I see correctly even also PoS work.

arith_uint256 workDiff = pbLast->nChainWork - pbFirst->nChainWork;

This is also the reason why all the returned network hashrates for the three different algos are always almost the same even though their difficulties vary a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions