aboutsummaryrefslogtreecommitdiff
path: root/src/test/sighash_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/sighash_tests.cpp')
-rw-r--r--src/test/sighash_tests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index e6905457bb..04d5462acb 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -11,8 +11,8 @@
#include <serialize.h>
#include <streams.h>
#include <test/test_bitcoin.h>
-#include <util.h>
-#include <utilstrencodings.h>
+#include <util/system.h>
+#include <util/strencodings.h>
#include <version.h>
#include <iostream>
@@ -105,7 +105,7 @@ void static RandomTransaction(CMutableTransaction &tx, bool fSingle) {
txin.prevout.hash = InsecureRand256();
txin.prevout.n = InsecureRandBits(2);
RandomScript(txin.scriptSig);
- txin.nSequence = (InsecureRandBool()) ? InsecureRand32() : (unsigned int)-1;
+ txin.nSequence = (InsecureRandBool()) ? InsecureRand32() : std::numeric_limits<uint32_t>::max();
}
for (int out = 0; out < outs; out++) {
tx.vout.push_back(CTxOut());
@@ -137,7 +137,7 @@ BOOST_AUTO_TEST_CASE(sighash_test)
int nIn = InsecureRandRange(txTo.vin.size());
uint256 sh, sho;
- sho = SignatureHashOld(scriptCode, txTo, nIn, nHashType);
+ sho = SignatureHashOld(scriptCode, CTransaction(txTo), nIn, nHashType);
sh = SignatureHash(scriptCode, txTo, nIn, nHashType, 0, SigVersion::BASE);
#if defined(PRINT_SIGHASH_JSON)
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);