|
8 | 8 | #include <key_io.h>
|
9 | 9 | #include <pubkey.h>
|
10 | 10 | #include <script/miniscript.h>
|
| 11 | +#include <script/parsing.h> |
11 | 12 | #include <script/script.h>
|
12 | 13 | #include <script/signingprovider.h>
|
13 | 14 | #include <script/solver.h>
|
|
17 | 18 | #include <span.h>
|
18 | 19 | #include <util/bip32.h>
|
19 | 20 | #include <util/check.h>
|
20 |
| -#include <util/spanparsing.h> |
21 | 21 | #include <util/strencodings.h>
|
22 | 22 | #include <util/vector.h>
|
23 | 23 |
|
@@ -1350,8 +1350,6 @@ enum class ParseScriptContext {
|
1350 | 1350 | /** Parse a public key that excludes origin information. */
|
1351 | 1351 | std::unique_ptr<PubkeyProvider> ParsePubkeyInner(uint32_t key_exp_index, const Span<const char>& sp, ParseScriptContext ctx, FlatSigningProvider& out, bool& apostrophe, std::string& error)
|
1352 | 1352 | {
|
1353 |
| - using namespace spanparsing; |
1354 |
| - |
1355 | 1353 | bool permit_uncompressed = ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH;
|
1356 | 1354 | auto split = Split(sp, '/');
|
1357 | 1355 | std::string str(split[0].begin(), split[0].end());
|
@@ -1424,8 +1422,6 @@ std::unique_ptr<PubkeyProvider> ParsePubkeyInner(uint32_t key_exp_index, const S
|
1424 | 1422 | /** Parse a public key including origin information (if enabled). */
|
1425 | 1423 | std::unique_ptr<PubkeyProvider> ParsePubkey(uint32_t key_exp_index, const Span<const char>& sp, ParseScriptContext ctx, FlatSigningProvider& out, std::string& error)
|
1426 | 1424 | {
|
1427 |
| - using namespace spanparsing; |
1428 |
| - |
1429 | 1425 | auto origin_split = Split(sp, ']');
|
1430 | 1426 | if (origin_split.size() > 2) {
|
1431 | 1427 | error = "Multiple ']' characters found for a single pubkey";
|
@@ -1589,7 +1585,7 @@ struct KeyParser {
|
1589 | 1585 | // NOLINTNEXTLINE(misc-no-recursion)
|
1590 | 1586 | std::unique_ptr<DescriptorImpl> ParseScript(uint32_t& key_exp_index, Span<const char>& sp, ParseScriptContext ctx, FlatSigningProvider& out, std::string& error)
|
1591 | 1587 | {
|
1592 |
| - using namespace spanparsing; |
| 1588 | + using namespace script; |
1593 | 1589 |
|
1594 | 1590 | auto expr = Expr(sp);
|
1595 | 1591 | if (Func("pk", expr)) {
|
@@ -2038,8 +2034,6 @@ std::unique_ptr<DescriptorImpl> InferScript(const CScript& script, ParseScriptCo
|
2038 | 2034 | /** Check a descriptor checksum, and update desc to be the checksum-less part. */
|
2039 | 2035 | bool CheckChecksum(Span<const char>& sp, bool require_checksum, std::string& error, std::string* out_checksum = nullptr)
|
2040 | 2036 | {
|
2041 |
| - using namespace spanparsing; |
2042 |
| - |
2043 | 2037 | auto check_split = Split(sp, '#');
|
2044 | 2038 | if (check_split.size() > 2) {
|
2045 | 2039 | error = "Multiple '#' symbols";
|
|
0 commit comments