Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <chainey> MaterialDefender, yeah, looks like getdifficulty only partially implemented it
- <MaterialDefender> That's what I thought :/
- <chainey> small patch:
- <chainey> diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
- <chainey> index 653933c..9849f75 100644
- <chainey> --- a/src/rpcblockchain.cpp
- <chainey> +++ b/src/rpcblockchain.cpp
- <chainey> @@ -109,11 +109,15 @@ Value getbestblockhash(const Array& params, bool fHelp)
- <chainey>
- <chainey> Value getdifficulty(const Array& params, bool fHelp)
- <chainey> {
- <chainey> - if (fHelp || params.size() != 0)
- <chainey> + if (fHelp)
- <chainey> throw runtime_error(
- <chainey> "getdifficulty\n"
- <chainey> "Returns the proof-of-work difficulty as a multiple of the minimum difficulty.");
- <chainey>
- <chainey> + int miningAlgo = 0;
- <chainey> + if (params.size() == 1)
- <chainey> + miningAlgo = params[0].get_int();
- <chainey> +
- <chainey> return GetDifficulty(NULL, miningAlgo);
- <chainey> }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement