mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
bitcoin-tx: Avoid treating overflow as OP_0
This commit is contained in:
@@ -38,7 +38,6 @@ BOOST_AUTO_TEST_CASE(parse_script)
|
||||
{"'17'", "023137"},
|
||||
{"ELSE", "67"},
|
||||
{"NOP10", "b9"},
|
||||
{"11111111111111111111", "00"},
|
||||
};
|
||||
std::string all_in;
|
||||
std::string all_out;
|
||||
@@ -49,6 +48,7 @@ BOOST_AUTO_TEST_CASE(parse_script)
|
||||
}
|
||||
BOOST_CHECK_EQUAL(HexStr(ParseScript(all_in)), all_out);
|
||||
|
||||
BOOST_CHECK_EXCEPTION(ParseScript("11111111111111111111"), std::runtime_error, HasReason("script parse error: decimal numeric value only allowed in the range -0xFFFFFFFF...0xFFFFFFFF"));
|
||||
BOOST_CHECK_EXCEPTION(ParseScript("11111111111"), std::runtime_error, HasReason("script parse error: decimal numeric value only allowed in the range -0xFFFFFFFF...0xFFFFFFFF"));
|
||||
BOOST_CHECK_EXCEPTION(ParseScript("OP_CHECKSIGADD"), std::runtime_error, HasReason("script parse error: unknown opcode"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user