Permalink
Browse files

Merge #7848: Divergence between 32- and 64-bit when hashing >4GB affe…

…cts `gettxoutsetinfo`

28b400f doc: update release-notes for `gettxoutsetinfo` change (Wladimir J. van der Laan)
76212bb rpc: make sure `gettxoutsetinfo` hash has txids (Wladimir J. van der Laan)
9ad1a51 crypto: bytes counts are 64 bit (Wladimir J. van der Laan)
  • Loading branch information...
laanwj committed Apr 18, 2016
2 parents b1bf511 + 28b400f commit 88616d2008633aaa197df4312585efcd11bf889f
Showing with 12 additions and 4 deletions.
  1. +7 −0 doc/release-notes.md
  2. +1 −1 src/crypto/ripemd160.h
  3. +1 −1 src/crypto/sha1.h
  4. +1 −1 src/crypto/sha256.h
  5. +1 −1 src/crypto/sha512.h
  6. +1 −0 src/rpc/blockchain.cpp
View
@@ -21,6 +21,13 @@ It is recommended to use this for sensitive information such as wallet
passphrases, as command-line arguments can usually be read from the process
table by any user on the system.
RPC low-level changes
----------------------
- `gettxoutsetinfo` UTXO hash (`hash_serialized`) has changed. There was a divergence between
32-bit and 64-bit platforms, and the txids were missing in the hashed data. This has been
fixed, but this means that the output will be different than from previous versions.
0.13.0 Change log
=================
View
@@ -14,7 +14,7 @@ class CRIPEMD160
private:
uint32_t s[5];
unsigned char buf[64];
size_t bytes;
uint64_t bytes;
public:
static const size_t OUTPUT_SIZE = 20;
View
@@ -14,7 +14,7 @@ class CSHA1
private:
uint32_t s[5];
unsigned char buf[64];
size_t bytes;
uint64_t bytes;
public:
static const size_t OUTPUT_SIZE = 20;
View
@@ -14,7 +14,7 @@ class CSHA256
private:
uint32_t s[8];
unsigned char buf[64];
size_t bytes;
uint64_t bytes;
public:
static const size_t OUTPUT_SIZE = 32;
View
@@ -14,7 +14,7 @@ class CSHA512
private:
uint64_t s[8];
unsigned char buf[128];
size_t bytes;
uint64_t bytes;
public:
static const size_t OUTPUT_SIZE = 64;
View
@@ -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()) {

0 comments on commit 88616d2

Please sign in to comment.