diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2018-05-20 14:04:15 -0700 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2018-05-20 22:19:42 -0700 |
commit | ebec7317ca1acbc65afa7fb08fc219c315fc4527 (patch) | |
tree | 7cce4ca196629a3bf18637f2adfee7fc7bfc717b /src/rpc/blockchain.h | |
parent | d792e47421fcb9ce3b381c1e6d8902777ae3f9f3 (diff) |
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.
Diffstat (limited to 'src/rpc/blockchain.h')
-rw-r--r-- | src/rpc/blockchain.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rpc/blockchain.h b/src/rpc/blockchain.h index 960edfd56f..3aa8de2d2b 100644 --- a/src/rpc/blockchain.h +++ b/src/rpc/blockchain.h @@ -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 - |