Merge #10095: refactor: Move GetDifficulty out of rpc/server.h
Summary:
backport PR10095 https://github.com/bitcoin/bitcoin/pull/10095/files
f885b67 refactor: Make rest.cpp dependency on *toJSON in blockchain.cpp explicit (Wladimir J. van der Laan)
8d8f28d refactor: Move RPCNotifyBlockChange out of rpc/server.h (Wladimir J. van der Laan)
e6dcfee refactor: Move GetDifficulty out of rpc/server.h (Wladimir J. van der Laan)
Made slightly awkward due to semiduplicated effort / out of order
backports; some tiny cleanup changes made too.
(Also supersedes PR9612, which added that comment in front of GetDifficulty.)
Depends on D3013
Test Plan:
make check
test_runner.py
Reviewers: jasonbcox, #bitcoin_abc, deadalnix, Fabien
Reviewed By: #bitcoin_abc, deadalnix, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D3014