Update sighash tests for new consensus rule
This commit is contained in:
parent
7ac924cdb7
commit
f4f1b4b097
|
@ -237,8 +237,14 @@ BOOST_AUTO_TEST_CASE(sighash_from_data)
|
||||||
stream >> tx;
|
stream >> tx;
|
||||||
|
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
BOOST_CHECK_MESSAGE(CheckTransactionWithoutProofVerification(tx, state), strTest);
|
if (tx.nVersion < MIN_TX_VERSION) {
|
||||||
BOOST_CHECK(state.IsValid());
|
// Transaction must be invalid
|
||||||
|
BOOST_CHECK_MESSAGE(!CheckTransactionWithoutProofVerification(tx, state), strTest);
|
||||||
|
BOOST_CHECK(!state.IsValid());
|
||||||
|
} else {
|
||||||
|
BOOST_CHECK_MESSAGE(CheckTransactionWithoutProofVerification(tx, state), strTest);
|
||||||
|
BOOST_CHECK(state.IsValid());
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<unsigned char> raw = ParseHex(raw_script);
|
std::vector<unsigned char> raw = ParseHex(raw_script);
|
||||||
scriptCode.insert(scriptCode.end(), raw.begin(), raw.end());
|
scriptCode.insert(scriptCode.end(), raw.begin(), raw.end());
|
||||||
|
|
Loading…
Reference in New Issue