mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
test: Add missing script_standard_Solver_success cases
This commit is contained in:
parent
45385018e1
commit
fa59e0b5bd
1 changed files with 16 additions and 0 deletions
|
@ -107,6 +107,22 @@ BOOST_AUTO_TEST_CASE(script_standard_Solver_success)
|
|||
BOOST_CHECK_EQUAL(solutions.size(), 1U);
|
||||
BOOST_CHECK(solutions[0] == ToByteVector(scriptHash));
|
||||
|
||||
// TxoutType::WITNESS_V1_TAPROOT
|
||||
s.clear();
|
||||
s << OP_1 << ToByteVector(uint256::ZERO);
|
||||
BOOST_CHECK_EQUAL(Solver(s, solutions), TxoutType::WITNESS_V1_TAPROOT);
|
||||
BOOST_CHECK_EQUAL(solutions.size(), 2U);
|
||||
BOOST_CHECK(solutions[0] == std::vector<unsigned char>{1});
|
||||
BOOST_CHECK(solutions[1] == ToByteVector(uint256::ZERO));
|
||||
|
||||
// TxoutType::WITNESS_UNKNOWN
|
||||
s.clear();
|
||||
s << OP_16 << ToByteVector(uint256::ONE);
|
||||
BOOST_CHECK_EQUAL(Solver(s, solutions), TxoutType::WITNESS_UNKNOWN);
|
||||
BOOST_CHECK_EQUAL(solutions.size(), 2U);
|
||||
BOOST_CHECK(solutions[0] == std::vector<unsigned char>{16});
|
||||
BOOST_CHECK(solutions[1] == ToByteVector(uint256::ONE));
|
||||
|
||||
// TxoutType::NONSTANDARD
|
||||
s.clear();
|
||||
s << OP_9 << OP_ADD << OP_11 << OP_EQUAL;
|
||||
|
|
Loading…
Add table
Reference in a new issue