diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-09 07:59:49 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-15 18:03:05 +0200 |
commit | 76212bbc6a13298d7154ac16c0b989aca5471de8 (patch) | |
tree | 76a46b460ba68ec1188fc640df43da7a634a283c /src/rpc/blockchain.cpp | |
parent | 9ad1a518574b9afed3e66a1e1658ead1d3d7ce54 (diff) | |
download | bitcoin-76212bbc6a13298d7154ac16c0b989aca5471de8.tar.xz |
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/rpc/blockchain.cpp')
-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 b85b2f6b57..88f6278b2a 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()) { |