mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-26 23:09:03 +02:00
Drop the chain argument to GetDifficulty
This removes the need to include rpc/blockchain.cpp in order to put GetDifficulty under test. GetDifficulty was called in two ways: * with a guaranteed non-null blockindex * with no argument Change the latter case to be provided chainActive.Tip() explicitly.
This commit is contained in:
@@ -16,7 +16,7 @@ class UniValue;
|
||||
* @return A floating point number that is a multiple of the main net minimum
|
||||
* difficulty (4295032833 hashes).
|
||||
*/
|
||||
double GetDifficulty(const CBlockIndex* blockindex = nullptr);
|
||||
double GetDifficulty(const CBlockIndex* blockindex);
|
||||
|
||||
/** Callback for when block tip changed. */
|
||||
void RPCNotifyBlockChange(bool ibd, const CBlockIndex *);
|
||||
@@ -34,4 +34,3 @@ UniValue mempoolToJSON(bool fVerbose = false);
|
||||
UniValue blockheaderToJSON(const CBlockIndex* blockindex);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user