aboutsummaryrefslogtreecommitdiff
path: root/src/script/standard.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2022-08-16 15:26:19 -0400
committerfanquake <fanquake@gmail.com>2022-10-13 23:45:36 +0800
commit4d42c3a2401c63084bf94433609240daa366753e (patch)
tree1079545b13ab823f96cc0281d49b1585e1e7965a /src/script/standard.h
parentd810fde8ea64b71567f8b50895ac76bcb7afbfbc (diff)
downloadbitcoin-4d42c3a2401c63084bf94433609240daa366753e.tar.xz
psbt: Only include m_tap_tree if it has scripts
Github-Pull: #25858 Rebased-From: 30ff25cf37eec4b09ab40424eb5d6a4a80410955
Diffstat (limited to 'src/script/standard.h')
-rw-r--r--src/script/standard.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/standard.h b/src/script/standard.h
index 1e6769782a..966a52b2c7 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -315,6 +315,8 @@ public:
TaprootSpendData GetSpendData() const;
/** Returns a vector of tuples representing the depth, leaf version, and script */
std::vector<std::tuple<uint8_t, uint8_t, CScript>> GetTreeTuples() const;
+ /** Returns true if there are any tapscripts */
+ bool HasScripts() const { return !m_branch.empty(); }
};
/** Given a TaprootSpendData and the output key, reconstruct its script tree.