diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-03-26 12:56:08 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-03-26 12:56:14 -0400 |
commit | e14cd04abbb56ed1bc65aa817132f5d6de6a37cf (patch) | |
tree | 262ceb222ac0ad8c03c2ce85f68d3b77d540969f /src | |
parent | 8a8b03ecd2218dcdbcbf3127f2fa94f0f0da4698 (diff) | |
parent | e16b6a71880052a6f7a368d8357901b0460abaef (diff) |
Merge #15637: rpc: Rename size to vsize in mempool related calls
e16b6a7188 rpc: Rename size to vsize in mempool related calls (Miguel Herranz)
Pull request description:
#13008 rebased on `master`, with release notes split out.
> In getmempoolancestors, getmempooldescendants, getmempoolentry and getrawmempool RPCs size returns the virtual transaction size as defined in BIP 141. Renaming it to vsize makes it consistent with returned value and other calls such as getrawtransaction.
>
> Related to #11218.
ACKs for commit e16b6a:
MarcoFalke:
re-utACK e16b6a71880052a6f7a368d8357901b0460abaef
jnewbery:
utACK e16b6a71880052a6f7a368d8357901b0460abaef
Tree-SHA512: ce95260fe7f280eacf4ff70bfffe02315c3a521b3b462a34e72a05b90733f40cc473319ac2df05d3e3c12cb7b1fbf2a1bbea632a8f979fff94207854cdbd494d
Diffstat (limited to 'src')
-rw-r--r-- | src/rpc/blockchain.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 1827aec637..d35f458b2e 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -378,7 +378,9 @@ static UniValue getdifficulty(const JSONRPCRequest& request) static std::string EntryDescriptionString() { - return " \"size\" : 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" + 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" " \"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" @@ -416,7 +418,8 @@ static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPool fees.pushKV("descendant", ValueFromAmount(e.GetModFeesWithDescendants())); info.pushKV("fees", fees); - info.pushKV("size", (int)e.GetTxSize()); + info.pushKV("vsize", (int)e.GetTxSize()); + if (IsDeprecatedRPCEnabled("size")) info.pushKV("size", (int)e.GetTxSize()); info.pushKV("fee", ValueFromAmount(e.GetFee())); info.pushKV("modifiedfee", ValueFromAmount(e.GetModifiedFee())); info.pushKV("time", e.GetTime()); |