From 5a1c7d5acc088df01c6f43e977b6b7d0704b4841 Mon Sep 17 00:00:00 2001 From: timemarkovqtum Date: Tue, 4 Jun 2024 12:11:17 +0200 Subject: [PATCH] Port script --- src/script/descriptor.cpp | 1 + src/script/interpreter.cpp | 180 ++++++++++++++++++++++++++++++++++--- src/script/interpreter.h | 41 ++++++++- src/script/sigcache.cpp | 13 +++ src/script/sigcache.h | 11 +++ src/script/sign.cpp | 138 ++++++++++++++++++++++++++++ src/script/sign.h | 30 +++++++ src/script/solver.cpp | 73 ++++++++++++++- src/script/solver.h | 18 +++- 9 files changed, 491 insertions(+), 14 deletions(-) diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index c6bc5f8f1d..2b662d7afe 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -783,6 +783,7 @@ class PKDescriptor final : public DescriptorImpl } public: PKDescriptor(std::unique_ptr prov, bool xonly = false) : DescriptorImpl(Vector(std::move(prov)), "pk"), m_xonly(xonly) {} + std::optional GetOutputType() const override { return OutputType::LEGACY; } bool IsSingleType() const final { return true; } std::optional ScriptSize() const override { diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index c969ce45f1..2658c2a773 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -12,8 +12,6 @@ #include