mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Make DUMMY_CHECKER availble outside of script/sign.cpp
This commit is contained in:
parent
ff638323d1
commit
116a620ce7
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user