aboutsummaryrefslogtreecommitdiff
path: root/src/script/standard.h
diff options
context:
space:
mode:
authorAntoine Poinsot <darosior@protonmail.com>2021-09-25 15:21:57 +0200
committerAntoine Poinsot <darosior@protonmail.com>2022-03-17 14:09:06 +0100
commit31ec6ae92a5d9910a26d90a6ff20bab27dee5826 (patch)
treefe9cd1f3d20ebbd28762c7f76531a57ab13755ae /src/script/standard.h
parent8435d7f11a89bb3f93306646f62cc2179693e072 (diff)
downloadbitcoin-31ec6ae92a5d9910a26d90a6ff20bab27dee5826.tar.xz
script: make IsPushdataOp non-static
We'll need it for Miniscript
Diffstat (limited to 'src/script/standard.h')
-rw-r--r--src/script/standard.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/standard.h b/src/script/standard.h
index 75bfe2db38..f0b143c52b 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -162,6 +162,11 @@ bool IsValidDestination(const CTxDestination& dest);
/** Get the name of a TxoutType as a string */
std::string GetTxnOutputType(TxoutType t);
+constexpr bool IsPushdataOp(opcodetype opcode)
+{
+ return opcode > OP_FALSE && opcode <= OP_PUSHDATA4;
+}
+
/**
* Parse a scriptPubKey and identify script type for standard scripts. If
* successful, returns script type and parsed pubkeys or hashes, depending on