Improve gettxoutsetinfo command
* Bugfix: output the correct best block hash (during IBD, it can differ from the actual current best block) * Add height to output * Add hash_serialized, which is a hash of the entire UTXO state. Can be useful to compare two nodes. * Add total_amount, the sum of all UTXOs' values.
This commit is contained in:
@@ -2096,11 +2096,14 @@ extern CTxMemPool mempool;
|
||||
struct CCoinsStats
|
||||
{
|
||||
int nHeight;
|
||||
uint256 hashBlock;
|
||||
uint64 nTransactions;
|
||||
uint64 nTransactionOutputs;
|
||||
uint64 nSerializedSize;
|
||||
uint256 hashSerialized;
|
||||
int64 nTotalAmount;
|
||||
|
||||
CCoinsStats() : nHeight(0), nTransactions(0), nTransactionOutputs(0), nSerializedSize(0) {}
|
||||
CCoinsStats() : nHeight(0), hashBlock(0), nTransactions(0), nTransactionOutputs(0), nSerializedSize(0), hashSerialized(0), nTotalAmount(0) {}
|
||||
};
|
||||
|
||||
/** Abstract view on the open txout dataset. */
|
||||
|
||||
Reference in New Issue
Block a user