Browse Source

Update sighash tests for new consensus rule

pull/4/head
Jack Grigg 8 years ago
parent
commit
f4f1b4b097
No known key found for this signature in database GPG Key ID: 6A6914DAFBEA00DA
  1. 10
      src/test/sighash_tests.cpp

10
src/test/sighash_tests.cpp

@ -237,8 +237,14 @@ BOOST_AUTO_TEST_CASE(sighash_from_data)
stream >> tx;
CValidationState state;
BOOST_CHECK_MESSAGE(CheckTransactionWithoutProofVerification(tx, state), strTest);
BOOST_CHECK(state.IsValid());
if (tx.nVersion < MIN_TX_VERSION) {
// 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);
scriptCode.insert(scriptCode.end(), raw.begin(), raw.end());

Loading…
Cancel
Save