aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-04-18 12:48:06 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-04-18 12:48:09 +0200
commit88616d2008633aaa197df4312585efcd11bf889f (patch)
treebebb7e73f55dc66f365767a41fd05d8f69d5fe3d
parentb1bf511af693c8ad676c0472633c22aed7b733f2 (diff)
parent28b400f7d146cca311d0d02d636a3251bddd4b04 (diff)
downloadbitcoin-88616d2008633aaa197df4312585efcd11bf889f.tar.xz
Merge #7848: Divergence between 32- and 64-bit when hashing >4GB affects `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)
-rw-r--r--doc/release-notes.md7
-rw-r--r--src/crypto/ripemd160.h2
-rw-r--r--src/crypto/sha1.h2
-rw-r--r--src/crypto/sha256.h2
-rw-r--r--src/crypto/sha512.h2
-rw-r--r--src/rpc/blockchain.cpp1
6 files changed, 12 insertions, 4 deletions
diff --git a/doc/release-notes.md b/doc/release-notes.md
index 806d174ebf..8360cc4816 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -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
=================
diff --git a/src/crypto/ripemd160.h b/src/crypto/ripemd160.h
index 687204fdae..bd41f02508 100644
--- a/src/crypto/ripemd160.h
+++ b/src/crypto/ripemd160.h
@@ -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;
diff --git a/src/crypto/sha1.h b/src/crypto/sha1.h
index 7b2a21bc6c..8fb20810be 100644
--- a/src/crypto/sha1.h
+++ b/src/crypto/sha1.h
@@ -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;
diff --git a/src/crypto/sha256.h b/src/crypto/sha256.h
index 85cf33739a..5b15b6a233 100644
--- a/src/crypto/sha256.h
+++ b/src/crypto/sha256.h
@@ -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;
diff --git a/src/crypto/sha512.h b/src/crypto/sha512.h
index f1f17caf90..614681fae2 100644
--- a/src/crypto/sha512.h
+++ b/src/crypto/sha512.h
@@ -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;
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()) {