git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
f70f613
)
PPCoin: RPC command 'getdifficulty' shows proof-of-stake difficulty as well
author
Sunny King
<sunnyking9999@gmail.com>
Wed, 1 Aug 2012 14:03:50 +0000 (15:03 +0100)
committer
Sunny King
<sunnyking9999@gmail.com>
Wed, 1 Aug 2012 14:05:32 +0000 (15:05 +0100)
src/bitcoinrpc.cpp
patch
|
blob
|
history
diff --git
a/src/bitcoinrpc.cpp
b/src/bitcoinrpc.cpp
index
5763d34
..
b2ff091
100644
(file)
--- a/
src/bitcoinrpc.cpp
+++ b/
src/bitcoinrpc.cpp
@@
-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;
}