mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
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.
This commit is contained in:
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…
Reference in New Issue
Block a user