aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-10-09 13:36:10 -0400
committerGavin Andresen <gavinandresen@gmail.com>2011-10-09 13:36:10 -0400
commiteab61cd0b277da17816834fea81aa7a2d7f9c011 (patch)
tree8903f6977bd2e00fd1ce814c1df7267cc3c079f8 /src/bitcoinrpc.cpp
parent94eaab77109dd4fa568a855a375adb2c2a3207f9 (diff)
parent4db9705dd839cbb386398b1eb4be2a67357c27c4 (diff)
Merge branch 'master' of github.com:bitcoin/bitcoin
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r--src/bitcoinrpc.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index e9d8ca6a04..6e2eac5a7e 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -1773,7 +1773,14 @@ Value getmemorypool(const Array& params, bool fHelp)
result.push_back(Pair("transactions", transactions));
result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].vout[0].nValue));
result.push_back(Pair("time", (int64_t)pblock->nTime));
- result.push_back(Pair("bits", (int64_t)pblock->nBits));
+
+ union {
+ int32_t nBits;
+ char cBits[4];
+ } uBits;
+ uBits.nBits = htonl((int32_t)pblock->nBits);
+ result.push_back(Pair("bits", HexStr(BEGIN(uBits.cBits), END(uBits.cBits))));
+
return result;
}
else