diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/descriptor.cpp | 6 | ||||
-rw-r--r-- | src/script/interpreter.h | 4 | ||||
-rw-r--r-- | src/script/sign.cpp | 5 | ||||
-rw-r--r-- | src/script/sign.h | 2 |
4 files changed, 11 insertions, 6 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index 0078bb2a65..864eb8864f 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -572,7 +572,7 @@ public: if (pos++) ret += ","; std::string tmp; if (!scriptarg->ToStringHelper(arg, tmp, type, cache)) return false; - ret += std::move(tmp); + ret += tmp; } return true; } @@ -596,7 +596,7 @@ public: tmp = pubkey->ToString(); break; } - ret += std::move(tmp); + ret += tmp; } std::string subscript; if (!ToStringSubScriptHelper(arg, subscript, type, cache)) return false; @@ -914,7 +914,7 @@ protected: } std::string tmp; if (!m_subdescriptor_args[pos]->ToStringHelper(arg, tmp, type, cache)) return false; - ret += std::move(tmp); + ret += tmp; while (!path.empty() && path.back()) { if (path.size() > 1) ret += '}'; path.pop_back(); diff --git a/src/script/interpreter.h b/src/script/interpreter.h index f91578d684..ba910cc945 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -307,10 +307,10 @@ using MutableTransactionSignatureChecker = GenericTransactionSignatureChecker<CM class DeferringSignatureChecker : public BaseSignatureChecker { protected: - BaseSignatureChecker& m_checker; + const BaseSignatureChecker& m_checker; public: - DeferringSignatureChecker(BaseSignatureChecker& checker) : m_checker(checker) {} + DeferringSignatureChecker(const BaseSignatureChecker& checker) : m_checker(checker) {} bool CheckECDSASignature(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, SigVersion sigversion) const override { diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 4014ebadbc..5da0d076d8 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -596,8 +596,11 @@ public: bool CheckECDSASignature(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, SigVersion sigversion) const override { return true; } bool CheckSchnorrSignature(Span<const unsigned char> sig, Span<const unsigned char> pubkey, SigVersion sigversion, ScriptExecutionData& execdata, ScriptError* serror) const override { return true; } }; -const DummySignatureChecker DUMMY_CHECKER; +} + +const BaseSignatureChecker& DUMMY_CHECKER = DummySignatureChecker(); +namespace { class DummySignatureCreator final : public BaseSignatureCreator { private: char m_r_len = 32; diff --git a/src/script/sign.h b/src/script/sign.h index 958d673b9f..813dfe04e3 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -52,6 +52,8 @@ public: bool CreateSchnorrSig(const SigningProvider& provider, std::vector<unsigned char>& sig, const XOnlyPubKey& pubkey, const uint256* leaf_hash, const uint256* merkle_root, SigVersion sigversion) const override; }; +/** A signature checker that accepts all signatures */ +extern const BaseSignatureChecker& DUMMY_CHECKER; /** A signature creator that just produces 71-byte empty signatures. */ extern const BaseSignatureCreator& DUMMY_SIGNATURE_CREATOR; /** A signature creator that just produces 72-byte empty signatures. */ |