Skip to content

Commit

Permalink
Add script tests for tail-call recursion.
Browse files Browse the repository at this point in the history
  • Loading branch information
maaku committed Jul 31, 2017
1 parent 10d5f90 commit a6219f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/test/data/script_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -2718,5 +2718,8 @@
["0x420102ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb2e7d2c03a9507ae265ecf5b5356885a53393a2029d241394997265a1a25aefc6 0x203e23e8160039594a33894f6564e1b1348bbd7a0088d42c4acb73eeaed59c009d", "0x2020bff50d50cd12bd3d3b0f65f9bdf16b11ba98dbb6bac4e74df97f83e077c537 CHECKMERKLEBRANCHVERIFY 1", "P2SH,STRICTENC", "OK", "Check middle branch of sha256('a') || sha256('b') || sha256('c')"],
["0x2201019ef775d9130e8d1aa3af2abeabb23f34e2dfaf6a938d462641503f2b0bcdf98c 0x202e7d2c03a9507ae265ecf5b5356885a53393a2029d241394997265a1a25aefc6", "0x2020bff50d50cd12bd3d3b0f65f9bdf16b11ba98dbb6bac4e74df97f83e077c537 CHECKMERKLEBRANCHVERIFY 1", "P2SH,STRICTENC", "OK", "Check right branch of sha256('a') || sha256('b') || sha256('c')"],

["Tail call recursion tests"],
["0x016a", "1 0x016a", "TAIL_CALL", "OP_RETURN", "comment"],

["The End"]
]
3 changes: 2 additions & 1 deletion src/test/transaction_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ static std::map<std::string, unsigned int> mapFlagNames = boost::assign::map_lis
(std::string("CHECKSEQUENCEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)
(std::string("WITNESS"), (unsigned int)SCRIPT_VERIFY_WITNESS)
(std::string("DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM)
(std::string("WITNESS_PUBKEYTYPE"), (unsigned int)SCRIPT_VERIFY_WITNESS_PUBKEYTYPE);
(std::string("WITNESS_PUBKEYTYPE"), (unsigned int)SCRIPT_VERIFY_WITNESS_PUBKEYTYPE)
(std::string("TAIL_CALL"), (unsigned int)SCRIPT_VERIFY_TAIL_CALL);

unsigned int ParseScriptFlags(std::string strFlags)
{
Expand Down

0 comments on commit a6219f0

Please sign in to comment.