0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-02 09:46:52 -05:00

miniscript: rename IsSane and IsSaneSubexpression to prevent misuse

This commit is contained in:
Antoine Poinsot 2022-05-17 17:25:30 +02:00
parent c5fe5163dc
commit f3a50c9dfe
No known key found for this signature in database
GPG key ID: E13FC145CD3F4304

View file

@ -839,11 +839,11 @@ public:
//! Whether successful non-malleable satisfactions are guaranteed to be valid.
bool ValidSatisfactions() const { return IsValid() && CheckOpsLimit() && CheckStackSize(); }
//! Whether the apparent policy of this node matches its script semantics.
bool IsSane() const { return ValidSatisfactions() && IsNonMalleable() && CheckTimeLocksMix() && CheckDuplicateKey(); }
//! Whether the apparent policy of this node matches its script semantics. Doesn't guarantee it is a safe script on its own.
bool IsSaneSubexpression() const { return ValidSatisfactions() && IsNonMalleable() && CheckTimeLocksMix() && CheckDuplicateKey(); }
//! Check whether this node is safe as a script on its own.
bool IsSaneTopLevel() const { return IsValidTopLevel() && IsSane() && NeedsSignature(); }
bool IsSane() const { return IsValidTopLevel() && IsSaneSubexpression() && NeedsSignature(); }
//! Equality testing.
bool operator==(const Node<Key>& arg) const { return Compare(*this, arg) == 0; }