mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-03 01:09:14 +01:00
script/sign: signing support for Miniscript with timelocks
This commit is contained in:
@@ -438,9 +438,9 @@ struct Satisfier {
|
||||
}
|
||||
|
||||
//! Time lock satisfactions.
|
||||
// TODO
|
||||
bool CheckAfter(uint32_t value) const { return false; }
|
||||
bool CheckOlder(uint32_t value) const { return false; }
|
||||
bool CheckAfter(uint32_t value) const { return m_creator.Checker().CheckLockTime(CScriptNum(value)); }
|
||||
bool CheckOlder(uint32_t value) const { return m_creator.Checker().CheckSequence(CScriptNum(value)); }
|
||||
|
||||
|
||||
//! Hash preimage satisfactions.
|
||||
// TODO
|
||||
@@ -675,6 +675,8 @@ public:
|
||||
DummySignatureChecker() = default;
|
||||
bool CheckECDSASignature(const std::vector<unsigned char>& sig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, SigVersion sigversion) const override { return sig.size() != 0; }
|
||||
bool CheckSchnorrSignature(Span<const unsigned char> sig, Span<const unsigned char> pubkey, SigVersion sigversion, ScriptExecutionData& execdata, ScriptError* serror) const override { return sig.size() != 0; }
|
||||
bool CheckLockTime(const CScriptNum& nLockTime) const override { return true; }
|
||||
bool CheckSequence(const CScriptNum& nSequence) const override { return true; }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user