rpc: make sure `gettxoutsetinfo` hash has txids

The key (transaction id for the following outputs) should be serialized
to the HashWriter.

This is a problem as it means different transactions in the same
position with the same outputs will potentially result in the same hash.

Fixes primary concern of #7758.
pull/262/head
Wladimir J. van der Laan 9 years ago
parent 9ad1a51857
commit 76212bbc6a

@ -467,6 +467,7 @@ static bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats)
CCoins coins;
if (pcursor->GetKey(key) && pcursor->GetValue(coins)) {
stats.nTransactions++;
ss << key;
for (unsigned int i=0; i<coins.vout.size(); i++) {
const CTxOut &out = coins.vout[i];
if (!out.IsNull()) {

Loading…
Cancel
Save