Browse Source

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.
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
76212bbc6a
  1. 1
      src/rpc/blockchain.cpp

1
src/rpc/blockchain.cpp

@ -467,6 +467,7 @@ static bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats) @@ -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