diff options
author | Fabian Jahr <fjahr@protonmail.com> | 2021-06-03 01:31:47 +0200 |
---|---|---|
committer | Fabian Jahr <fjahr@protonmail.com> | 2021-06-03 01:48:24 +0200 |
commit | fb65dde147f63422c4148b089c2f5be0bf5ba80f (patch) | |
tree | 3e82166d8e079cb1c3f9e17a9b4ad3ca17e913a7 /src/rpc/blockchain.cpp | |
parent | 8ea8c927ac05980d6a81252e40b7444e9abb74f9 (diff) |
scripted-diff: Fix coinstats data member names
Initially these values were 'per block' in an earlier version but were then changed to total values. The names were not updated to reflect that.
-BEGIN VERIFY SCRIPT-
s() { git grep -l "$1" src | xargs sed -i "s/$1/$2/g"; }
s 'm_block_unspendable_amount' 'm_total_unspendable_amount'
s 'm_block_prevout_spent_amount' 'm_total_prevout_spent_amount'
s 'm_block_new_outputs_ex_coinbase_amount' 'm_total_new_outputs_ex_coinbase_amount'
s 'm_block_coinbase_amount' 'm_total_coinbase_amount'
s 'block_unspendable_amount' 'total_unspendable_amount'
s 'block_prevout_spent_amount' 'total_prevout_spent_amount'
s 'block_new_outputs_ex_coinbase_amount' 'total_new_outputs_ex_coinbase_amount'
s 'block_coinbase_amount' 'total_coinbase_amount'
s 'unspendables_genesis_block' 'total_unspendables_genesis_block'
s 'unspendables_bip30' 'total_unspendables_bip30'
s 'unspendables_scripts' 'total_unspendables_scripts'
s 'unspendables_unclaimed_rewards' 'total_unspendables_unclaimed_rewards'
s 'm_unspendables_genesis_block' 'm_total_unspendables_genesis_block'
s 'm_unspendables_bip30' 'm_total_unspendables_bip30'
s 'm_unspendables_scripts' 'm_total_unspendables_scripts'
s 'm_unspendables_unclaimed_rewards' 'm_total_unspendables_unclaimed_rewards'
-END VERIFY SCRIPT-
Diffstat (limited to 'src/rpc/blockchain.cpp')
-rw-r--r-- | src/rpc/blockchain.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 03f28239ba..ee2f5a549b 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1191,7 +1191,7 @@ static RPCHelpMan gettxoutsetinfo() ret.pushKV("transactions", static_cast<int64_t>(stats.nTransactions)); ret.pushKV("disk_size", stats.nDiskSize); } else { - ret.pushKV("total_unspendable_amount", ValueFromAmount(stats.block_unspendable_amount)); + ret.pushKV("total_unspendable_amount", ValueFromAmount(stats.total_unspendable_amount)); CCoinsStats prev_stats{hash_type}; @@ -1200,16 +1200,16 @@ static RPCHelpMan gettxoutsetinfo() } UniValue block_info(UniValue::VOBJ); - block_info.pushKV("prevout_spent", ValueFromAmount(stats.block_prevout_spent_amount - prev_stats.block_prevout_spent_amount)); - block_info.pushKV("coinbase", ValueFromAmount(stats.block_coinbase_amount - prev_stats.block_coinbase_amount)); - block_info.pushKV("new_outputs_ex_coinbase", ValueFromAmount(stats.block_new_outputs_ex_coinbase_amount - prev_stats.block_new_outputs_ex_coinbase_amount)); - block_info.pushKV("unspendable", ValueFromAmount(stats.block_unspendable_amount - prev_stats.block_unspendable_amount)); + block_info.pushKV("prevout_spent", ValueFromAmount(stats.total_prevout_spent_amount - prev_stats.total_prevout_spent_amount)); + block_info.pushKV("coinbase", ValueFromAmount(stats.total_coinbase_amount - prev_stats.total_coinbase_amount)); + block_info.pushKV("new_outputs_ex_coinbase", ValueFromAmount(stats.total_new_outputs_ex_coinbase_amount - prev_stats.total_new_outputs_ex_coinbase_amount)); + block_info.pushKV("unspendable", ValueFromAmount(stats.total_unspendable_amount - prev_stats.total_unspendable_amount)); UniValue unspendables(UniValue::VOBJ); - unspendables.pushKV("genesis_block", ValueFromAmount(stats.unspendables_genesis_block - prev_stats.unspendables_genesis_block)); - unspendables.pushKV("bip30", ValueFromAmount(stats.unspendables_bip30 - prev_stats.unspendables_bip30)); - unspendables.pushKV("scripts", ValueFromAmount(stats.unspendables_scripts - prev_stats.unspendables_scripts)); - unspendables.pushKV("unclaimed_rewards", ValueFromAmount(stats.unspendables_unclaimed_rewards - prev_stats.unspendables_unclaimed_rewards)); + unspendables.pushKV("genesis_block", ValueFromAmount(stats.total_unspendables_genesis_block - prev_stats.total_unspendables_genesis_block)); + unspendables.pushKV("bip30", ValueFromAmount(stats.total_unspendables_bip30 - prev_stats.total_unspendables_bip30)); + unspendables.pushKV("scripts", ValueFromAmount(stats.total_unspendables_scripts - prev_stats.total_unspendables_scripts)); + unspendables.pushKV("unclaimed_rewards", ValueFromAmount(stats.total_unspendables_unclaimed_rewards - prev_stats.total_unspendables_unclaimed_rewards)); block_info.pushKV("unspendables", unspendables); ret.pushKV("block_info", block_info); |