mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Make CTransaction actually immutable
This commit is contained in:
@@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(sighash_from_data)
|
||||
std::string raw_tx, raw_script, sigHashHex;
|
||||
int nIn, nHashType;
|
||||
uint256 sh;
|
||||
CTransaction tx;
|
||||
CTransactionRef tx;
|
||||
CScript scriptCode = CScript();
|
||||
|
||||
try {
|
||||
@@ -199,7 +199,7 @@ BOOST_AUTO_TEST_CASE(sighash_from_data)
|
||||
stream >> tx;
|
||||
|
||||
CValidationState state;
|
||||
BOOST_CHECK_MESSAGE(CheckTransaction(tx, state), strTest);
|
||||
BOOST_CHECK_MESSAGE(CheckTransaction(*tx, state), strTest);
|
||||
BOOST_CHECK(state.IsValid());
|
||||
|
||||
std::vector<unsigned char> raw = ParseHex(raw_script);
|
||||
@@ -209,7 +209,7 @@ BOOST_AUTO_TEST_CASE(sighash_from_data)
|
||||
continue;
|
||||
}
|
||||
|
||||
sh = SignatureHash(scriptCode, tx, nIn, nHashType, 0, SIGVERSION_BASE);
|
||||
sh = SignatureHash(scriptCode, *tx, nIn, nHashType, 0, SIGVERSION_BASE);
|
||||
BOOST_CHECK_MESSAGE(sh.GetHex() == sigHashHex, strTest);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user