refactor: Move GetDifficulty out of `rpc/server.h`
commite6dcfeec05d6527ab148550836937ff435e6449c
authorWladimir J. van der Laan <laanwj@gmail.com>
Mon, 27 Mar 2017 10:14:43 +0000 (27 12:14 +0200)
committerWladimir J. van der Laan <laanwj@gmail.com>
Mon, 27 Mar 2017 10:21:35 +0000 (27 12:21 +0200)
tree08be69b20b3acb139378636597e938c5864696f1
parent5114f8113627791b871c88998bd5a3d36961c241
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`)
src/Makefile.am
src/rpc/blockchain.cpp
src/rpc/blockchain.h [new file with mode: 0644]
src/rpc/mining.cpp
src/rpc/misc.cpp
src/rpc/server.h