diff options
| author | MarcoFalke <[email protected]> | 2019-11-12 14:43:26 -0500 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2019-11-12 14:44:13 -0500 |
| commit | 1028882eea12652ad9cb3dc0741fa15a7a0e7bc0 (patch) | |
| tree | c66252144ad918434e961dc271eb5b29cbebb272 /src/wallet | |
| parent | Merge #17450: util: Add missing headers to util/fees.cpp (diff) | |
| parent | rpc: Expose block height of wallet transactions (diff) | |
| download | discoin-1028882eea12652ad9cb3dc0741fa15a7a0e7bc0.tar.xz discoin-1028882eea12652ad9cb3dc0741fa15a7a0e7bc0.zip | |
Merge #17437: rpc: Expose block height of wallet transactions
a5e77959c8ff6a8bffa1621d7ea29ee8603c5a14 rpc: Expose block height of wallet transactions (João Barbosa)
Pull request description:
Closes #17296.
ACKs for top commit:
practicalswift:
ACK a5e77959c8ff6a8bffa1621d7ea29ee8603c5a14 -- diff looks correct now (good catch @theStack!)
theStack:
ACK a5e77959c8ff6a8bffa1621d7ea29ee8603c5a14
ryanofsky:
Code review ACK a5e77959c8ff6a8bffa1621d7ea29ee8603c5a14. Changes since last review getblockhash python test fixes, and removing the last hardcoded height
Tree-SHA512: 57dcd0e4e7083f34016bf9cf8ef578fbfde49e882b6cd8623dd1c64716e096e62f6177a4c2ed94f5de304e751fe23fb9d11cf107a86fbf0a3c5f539cd2844916
Diffstat (limited to 'src/wallet')
| -rw-r--r-- | src/wallet/rpcwallet.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 0f146563b..00742aed7 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -142,6 +142,7 @@ static void WalletTxToJSON(interfaces::Chain& chain, interfaces::Chain::Lock& lo if (confirms > 0) { entry.pushKV("blockhash", wtx.m_confirm.hashBlock.GetHex()); + entry.pushKV("blockheight", wtx.m_confirm.block_height); entry.pushKV("blockindex", wtx.m_confirm.nIndex); int64_t block_time; bool found_block = chain.findBlock(wtx.m_confirm.hashBlock, nullptr /* block */, &block_time); @@ -1367,6 +1368,7 @@ static const std::string TransactionDescriptionString() " \"generated\": xxx, (bool) Only present if transaction only input is a coinbase one.\n" " \"trusted\": xxx, (bool) Only present if we consider transaction to be trusted and so safe to spend from.\n" " \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction.\n" + " \"blockheight\": n, (numeric) The block height containing the transaction.\n" " \"blockindex\": n, (numeric) The index of the transaction in the block that includes it.\n" " \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n" " \"txid\": \"transactionid\", (string) The transaction id.\n" |