mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
bitcoin-tx: Avoid treating overflow as OP_0
This commit is contained in:
parent
fa053c0019
commit
fa43e7c2d9
3 changed files with 10 additions and 4 deletions
|
|
@ -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"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue