aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorAntoine Poinsot <darosior@protonmail.com>2022-05-17 17:25:30 +0200
committerAntoine Poinsot <darosior@protonmail.com>2022-05-30 15:16:46 +0200
commitf3a50c9dfe645c548713e44e0eaf26ea9917a379 (patch)
tree0c235a8f58032877547037337cc2aca29928e750 /src/script
parentc5fe5163dc31db939c44129f2ff8283b290a9330 (diff)
downloadbitcoin-f3a50c9dfe645c548713e44e0eaf26ea9917a379.tar.xz
miniscript: rename IsSane and IsSaneSubexpression to prevent misuse
Diffstat (limited to 'src/script')
-rw-r--r--src/script/miniscript.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/miniscript.h b/src/script/miniscript.h
index 1fb0e17b12..2c239c2678 100644
--- a/src/script/miniscript.h
+++ b/src/script/miniscript.h
@@ -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; }