diff options
author | Forrest Voight <forrest@forre.st> | 2012-01-14 18:52:23 -0500 |
---|---|---|
committer | Forrest Voight <forrest@forre.st> | 2012-01-14 19:23:37 -0500 |
commit | ab845122587ed5bef403fcce1891a52501602a5a (patch) | |
tree | acd6c110c7e5f0c23cfb6a57e0c46172f57d8d2d | |
parent | 52a3d2635c417c8e2398d9d4853db938171d406b (diff) | |
download | bitcoin-ab845122587ed5bef403fcce1891a52501602a5a.tar.xz |
Added mintime and curtime to RPC getmemorypool
-rw-r--r-- | src/bitcoinrpc.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 50375dd9d9..5ac58de06d 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1873,6 +1873,8 @@ Value getmemorypool(const Array& params, bool fHelp) " \"coinbasevalue\" : maximum allowable input to coinbase transaction, including the generation award and transaction fees\n" " \"coinbaseflags\" : data that should be included in coinbase so support for new features can be judged\n" " \"time\" : timestamp appropriate for next block\n" + " \"mintime\" : minimum timestamp appropriate for next block\n" + " \"curtime\" : current timestamp\n" " \"bits\" : compressed target of next block\n" "If [data] is specified, tries to solve the block and returns true if it was successful."); @@ -1928,6 +1930,8 @@ Value getmemorypool(const Array& params, bool fHelp) result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].vout[0].nValue)); result.push_back(Pair("coinbaseflags", HexStr(COINBASE_FLAGS.begin(), COINBASE_FLAGS.end()))); result.push_back(Pair("time", (int64_t)pblock->nTime)); + result.push_back(Pair("mintime", (int64_t)pindexPrev->GetMedianTimePast()+1)); + result.push_back(Pair("curtime", (int64_t)GetAdjustedTime())); union { int32_t nBits; |