Skip to content

Commit

Permalink
PPCoin: RPC command 'getdifficulty' shows proof-of-stake difficulty a…
Browse files Browse the repository at this point in the history
…s well
  • Loading branch information
sunnyking committed Aug 1, 2012
1 parent f70f613 commit 3a59ce0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,12 @@ Value getdifficulty(const Array& params, bool fHelp)
if (fHelp || params.size() != 0)
throw runtime_error(
"getdifficulty\n"
"Returns the proof-of-work difficulty as a multiple of the minimum difficulty.");
"Returns difficulty as a multiple of the minimum difficulty.");

return GetDifficulty();
Object obj;
obj.push_back(Pair("proof-of-work", GetDifficulty()));
obj.push_back(Pair("proof-of-stake", GetDifficulty(GetLastBlockIndex(pindexBest, true))));
return obj;
}


Expand Down

0 comments on commit 3a59ce0

Please sign in to comment.