Commit Graph

5 Commits

Author SHA1 Message Date
Ben Woosley ebec7317ca
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.
2018-05-20 22:19:42 -07:00
practicalswift 4087d9ea7c Remove unnecessary forward class declarations in header files 2017-06-12 20:37:43 +02:00
Wladimir J. van der Laan f885b67029 refactor: Make rest.cpp dependency on `*toJSON` in `blockchain.cpp` explicit 2017-03-29 09:56:47 +02:00
Wladimir J. van der Laan 8d8f28dd52 refactor: Move RPCNotifyBlockChange out of `rpc/server.h` 2017-03-27 16:23:22 +02:00
Wladimir J. van der Laan e6dcfeec05 refactor: Move GetDifficulty out of `rpc/server.h`
It has no business in `rpcserver.h`. Define it in the interface header
of the implementation unit `rpcblockchain` where it is defined.

Also modernize the signature to:

    double GetDifficulty(const CBlockIndex* blockindex = nullptr);

(remove `extern`, replace `NULL` with `nullptr`)
2017-03-27 12:21:35 +02:00