diff --git a/src/test/blockencodings_tests.cpp b/src/test/blockencodings_tests.cpp --- a/src/test/blockencodings_tests.cpp +++ b/src/test/blockencodings_tests.cpp @@ -34,14 +34,12 @@ block.hashPrevBlock = InsecureRand256(); block.nBits = 0x207fffff; - tx.vin[0].prevout.hash = InsecureRand256(); - tx.vin[0].prevout.n = 0; + tx.vin[0].prevout = COutPoint(InsecureRand256(), 0); block.vtx[1] = MakeTransactionRef(tx); tx.vin.resize(10); for (size_t i = 0; i < tx.vin.size(); i++) { - tx.vin[i].prevout.hash = InsecureRand256(); - tx.vin[i].prevout.n = 0; + tx.vin[i].prevout = COutPoint(InsecureRand256(), 0); } block.vtx[2] = MakeTransactionRef(tx); diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp --- a/src/test/bloom_tests.cpp +++ b/src/test/bloom_tests.cpp @@ -228,8 +228,9 @@ 0); { std::vector data(32 + sizeof(unsigned int)); - memcpy(&data[0], prevOutPoint.hash.begin(), 32); - memcpy(&data[32], &prevOutPoint.n, sizeof(unsigned int)); + memcpy(&data[0], prevOutPoint.GetTxId().begin(), 32); + uint32_t n = prevOutPoint.GetN(); + memcpy(&data[32], &n, sizeof(uint32_t)); filter.insert(data); } BOOST_CHECK_MESSAGE( diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp --- a/src/test/sighash_tests.cpp +++ b/src/test/sighash_tests.cpp @@ -108,8 +108,7 @@ for (int in = 0; in < ins; in++) { tx.vin.push_back(CTxIn()); CTxIn &txin = tx.vin.back(); - txin.prevout.hash = InsecureRand256(); - txin.prevout.n = InsecureRandBits(2); + txin.prevout = COutPoint(InsecureRand256(), InsecureRandBits(2)); RandomScript(txin.scriptSig); txin.nSequence = (InsecureRandBool()) ? insecure_rand() : (unsigned int)-1; diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp --- a/src/test/sigopcount_tests.cpp +++ b/src/test/sigopcount_tests.cpp @@ -97,8 +97,7 @@ spendingTx.nVersion = 1; spendingTx.vin.resize(1); - spendingTx.vin[0].prevout.hash = creationTx.GetId(); - spendingTx.vin[0].prevout.n = 0; + spendingTx.vin[0].prevout = COutPoint(creationTx.GetId(), 0); spendingTx.vin[0].scriptSig = scriptSig; spendingTx.vout.resize(1); spendingTx.vout[0].nValue = Amount(1); @@ -190,8 +189,7 @@ CMutableTransaction tx; tx.nVersion = 1; tx.vin.resize(1); - tx.vin[0].prevout.hash = InsecureRand256(); - tx.vin[0].prevout.n = 0; + tx.vin[0].prevout = COutPoint(InsecureRand256(), 0); tx.vin[0].scriptSig = CScript(); tx.vout.resize(1); tx.vout[0].nValue = Amount(1);