aboutsummaryrefslogtreecommitdiff
path: root/src/rpcwallet.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-05-28 16:56:50 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-08-23 18:30:30 +0000
commitbdbfd2329a92ab3fa7ad51e50a9fb0411ec64dae (patch)
tree5c154348f4e3f9bec7aa6a103c154f5ab71cdba1 /src/rpcwallet.cpp
parent9c7722b7c5ce49130bd978b932f73b629ce5cebe (diff)
downloadbitcoin-bdbfd2329a92ab3fa7ad51e50a9fb0411ec64dae.tar.xz
JSON-RPC: Add "blocktime" and (for wallet transactions) "timereceived" to transaction Object outputs
Diffstat (limited to 'src/rpcwallet.cpp')
-rw-r--r--src/rpcwallet.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 005a7766f1..d75e43d4f9 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -38,9 +38,11 @@ void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
{
entry.push_back(Pair("blockhash", wtx.hashBlock.GetHex()));
entry.push_back(Pair("blockindex", wtx.nIndex));
+ entry.push_back(Pair("blocktime", (boost::int64_t)(mapBlockIndex[wtx.hashBlock]->nTime)));
}
entry.push_back(Pair("txid", wtx.GetHash().GetHex()));
entry.push_back(Pair("time", (boost::int64_t)wtx.GetTxTime()));
+ entry.push_back(Pair("timereceived", (boost::int64_t)wtx.nTimeReceived));
BOOST_FOREACH(const PAIRTYPE(string,string)& item, wtx.mapValue)
entry.push_back(Pair(item.first, item.second));
}