util: move spanparsing.h to script/parsing.h

Move miniscript / descriptor script parsing functions out of util library so
they are not a dependency of the kernel.

There are no changes to code or behavior.
This commit is contained in:
Ryan Ofsky
2023-12-06 15:58:47 -05:00
parent 6dd2ad4792
commit 9bcce2608d
9 changed files with 27 additions and 40 deletions

View File

@@ -12,12 +12,12 @@
#include <netaddress.h>
#include <netbase.h>
#include <random.h>
#include <script/parsing.h>
#include <sync.h>
#include <tinyformat.h>
#include <util/fs.h>
#include <util/readwritefile.h>
#include <util/sock.h>
#include <util/spanparsing.h>
#include <util/strencodings.h>
#include <util/threadinterrupt.h>
@@ -308,7 +308,7 @@ Session::Reply Session::SendRequestAndGetReply(const Sock& sock,
reply.full = sock.RecvUntilTerminator('\n', recv_timeout, *m_interrupt, MAX_MSG_SIZE);
for (const auto& kv : spanparsing::Split(reply.full, ' ')) {
for (const auto& kv : Split(reply.full, ' ')) {
const auto& pos = std::find(kv.begin(), kv.end(), '=');
if (pos != kv.end()) {
reply.keys.emplace(std::string{kv.begin(), pos}, std::string{pos + 1, kv.end()});