diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-04-09 07:59:49 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-04-15 18:03:05 +0200 |
| commit | 76212bbc6a13298d7154ac16c0b989aca5471de8 (patch) | |
| tree | 76a46b460ba68ec1188fc640df43da7a634a283c /src | |
| parent | crypto: bytes counts are 64 bit (diff) | |
| download | discoin-76212bbc6a13298d7154ac16c0b989aca5471de8.tar.xz discoin-76212bbc6a13298d7154ac16c0b989aca5471de8.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rpc/blockchain.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index b85b2f6b5..88f6278b2 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -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()) { |