rpc: Improve getblockstats

- Fix getblockstats for block height 0 which previously returned an error.
- Introduce alternative utxo_*_actual statistics which exclude unspendables: Genesis block, BIP30, unspendable outputs
- Update test data
- Explicitly test Genesis block results
This commit is contained in:
Fabian Jahr
2020-09-06 00:22:19 +02:00
parent cb94db119f
commit 2ca5a496c2
3 changed files with 45 additions and 8 deletions

View File

@ -142,7 +142,9 @@
"totalfee": 0,
"txs": 1,
"utxo_increase": 2,
"utxo_size_inc": 163
"utxo_increase_actual": 1,
"utxo_size_inc": 163,
"utxo_size_inc_actual": 75
},
{
"avgfee": 4460,
@ -179,7 +181,9 @@
"totalfee": 4460,
"txs": 2,
"utxo_increase": 3,
"utxo_size_inc": 236
"utxo_increase_actual": 2,
"utxo_size_inc": 236,
"utxo_size_inc_actual": 148
},
{
"avgfee": 24906,
@ -216,7 +220,9 @@
"totalfee": 74720,
"txs": 4,
"utxo_increase": 5,
"utxo_size_inc": 384
"utxo_size_inc": 384,
"utxo_increase_actual": 4,
"utxo_size_inc_actual": 296
}
]
}
}