aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-08-20 13:50:38 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-08-20 13:54:42 -0400
commit70b12af87eb036623f5dd1f3a519efe6c156570d (patch)
tree58e8e9aa34c31cfd4c891549d803846f3bb9c280 /src
parente00ecb3d7aaee463643e486ca03c318e192b8058 (diff)
parent17d178fb9463c195c822614eb0245188e52f8371 (diff)
downloadbitcoin-70b12af87eb036623f5dd1f3a519efe6c156570d.tar.xz
Merge #16647: rpc: add weight to getmempoolentry output
17d178fb9463c195c822614eb0245188e52f8371 doc: add release-notes for getmempoolentry weight field addition (fanquake) 9c9cc2bd201afc7d519778cfcdeba5c81faa49f4 qa: Add RPC tests for weight in mempool entry (Daniel Edgecumbe) 54aaa7883cb61d414627248e5e410180bfd8fa67 RPC: add weight to mempool entry output (Daniel Edgecumbe) Pull request description: Rebase of #14649 (which itself was a rebase of #11256). Squash the two test related commits, and swapped out `size` usage for `vsize`. Added a commit with release notes. ACKs for top commit: emilengler: Concept ACK 17d178f instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/16647/commits/17d178fb9463c195c822614eb0245188e52f8371 meshcollider: utACK 17d178fb9463c195c822614eb0245188e52f8371 Tree-SHA512: 1d354c9837e0ad0afa40325de9329b9e62688d5eab4d9e1cf9b46d8ae29d08f42d903ab37a41751c2ea8f9034231b21095881b1f5d911cb542b8b06bc85dc7cd
Diffstat (limited to 'src')
-rw-r--r--src/rpc/blockchain.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index bfb6ab6a21..a74003149d 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -374,6 +374,7 @@ static std::string EntryDescriptionString()
return " \"vsize\" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.\n"
" \"size\" : n, (numeric) (DEPRECATED) same as vsize. Only returned if bitcoind is started with -deprecatedrpc=size\n"
" size will be completely removed in v0.20.\n"
+ " \"weight\" : n, (numeric) transaction weight as defined in BIP 141.\n"
" \"fee\" : n, (numeric) transaction fee in " + CURRENCY_UNIT + " (DEPRECATED)\n"
" \"modifiedfee\" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)\n"
" \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n"
@@ -413,6 +414,7 @@ static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPool
info.pushKV("vsize", (int)e.GetTxSize());
if (IsDeprecatedRPCEnabled("size")) info.pushKV("size", (int)e.GetTxSize());
+ info.pushKV("weight", (int)e.GetTxWeight());
info.pushKV("fee", ValueFromAmount(e.GetFee()));
info.pushKV("modifiedfee", ValueFromAmount(e.GetModifiedFee()));
info.pushKV("time", e.GetTime());