|
4 | 4 |
|
5 | 5 | #include <test/data/bip341_wallet_vectors.json.h>
|
6 | 6 |
|
| 7 | +#include <addresstype.h> |
7 | 8 | #include <key.h>
|
8 | 9 | #include <key_io.h>
|
9 | 10 | #include <script/script.h>
|
@@ -130,7 +131,6 @@ BOOST_AUTO_TEST_CASE(script_standard_Solver_success)
|
130 | 131 | BOOST_CHECK(solutions[1] == ToByteVector(uint256::ONE));
|
131 | 132 |
|
132 | 133 | // TxoutType::ANCHOR
|
133 |
| - std::vector<unsigned char> anchor_bytes{0x4e, 0x73}; |
134 | 134 | s.clear();
|
135 | 135 | s << OP_1 << anchor_bytes;
|
136 | 136 | BOOST_CHECK_EQUAL(Solver(s, solutions), TxoutType::ANCHOR);
|
@@ -208,7 +208,7 @@ BOOST_AUTO_TEST_CASE(script_standard_Solver_failure)
|
208 | 208 |
|
209 | 209 | // TxoutType::ANCHOR but wrong witness version
|
210 | 210 | s.clear();
|
211 |
| - s << OP_2 << std::vector<unsigned char>{0x4e, 0x73}; |
| 211 | + s << OP_2 << anchor_bytes; |
212 | 212 | BOOST_CHECK(!s.IsPayToAnchor());
|
213 | 213 | BOOST_CHECK_EQUAL(Solver(s, solutions), TxoutType::WITNESS_UNKNOWN);
|
214 | 214 |
|
@@ -280,7 +280,6 @@ BOOST_AUTO_TEST_CASE(script_standard_ExtractDestination)
|
280 | 280 | BOOST_CHECK(std::get<WitnessV1Taproot>(address) == WitnessV1Taproot(xpk));
|
281 | 281 |
|
282 | 282 | // TxoutType::ANCHOR
|
283 |
| - std::vector<unsigned char> anchor_bytes{0x4e, 0x73}; |
284 | 283 | s.clear();
|
285 | 284 | s << OP_1 << anchor_bytes;
|
286 | 285 | BOOST_CHECK(ExtractDestination(s, address));
|
@@ -368,7 +367,6 @@ BOOST_AUTO_TEST_CASE(script_standard_GetScriptFor_)
|
368 | 367 | BOOST_CHECK(result == expected);
|
369 | 368 |
|
370 | 369 | // PayToAnchor
|
371 |
| - std::vector<unsigned char> anchor_bytes{0x4e, 0x73}; |
372 | 370 | expected.clear();
|
373 | 371 | expected << OP_1 << anchor_bytes;
|
374 | 372 | result = GetScriptForDestination(PayToAnchor());
|
|
0 commit comments