diff options
| author | Pieter Wuille <[email protected]> | 2016-11-11 16:23:17 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-12-02 18:37:43 -0800 |
| commit | 81e3228fcb33e8ed32d8b9fbe917444ba080073a (patch) | |
| tree | 345dd81bc1661003ea8957fe1f69050b3187d4ac /src/test/sighash_tests.cpp | |
| parent | Make DecodeHexTx return a CMutableTransaction (diff) | |
| download | discoin-81e3228fcb33e8ed32d8b9fbe917444ba080073a.tar.xz discoin-81e3228fcb33e8ed32d8b9fbe917444ba080073a.zip | |
Make CTransaction actually immutable
Diffstat (limited to 'src/test/sighash_tests.cpp')
| -rw-r--r-- | src/test/sighash_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp index 38d58e7ab..a524f5b94 100644 --- a/src/test/sighash_tests.cpp +++ b/src/test/sighash_tests.cpp @@ -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); } } |