mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-01 03:01:09 +02:00
Make script_{valid,invalid}.json validation flags configurable
This commit is contained in:
@ -26,7 +26,7 @@ using namespace boost::algorithm;
|
||||
// In script_tests.cpp
|
||||
extern Array read_json(const std::string& jsondata);
|
||||
|
||||
unsigned int ParseFlags(string strFlags){
|
||||
unsigned int ParseScriptFlags(string strFlags){
|
||||
unsigned int flags = 0;
|
||||
vector<string> words;
|
||||
split(words, strFlags, is_any_of(","));
|
||||
@ -119,7 +119,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
|
||||
break;
|
||||
}
|
||||
|
||||
unsigned int verify_flags = ParseFlags(test[2].get_str());
|
||||
unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
|
||||
BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
|
||||
tx, i, verify_flags, 0),
|
||||
strTest);
|
||||
@ -192,7 +192,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
|
||||
break;
|
||||
}
|
||||
|
||||
unsigned int verify_flags = ParseFlags(test[2].get_str());
|
||||
unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
|
||||
fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
|
||||
tx, i, verify_flags, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user