From 4d42c3a2401c63084bf94433609240daa366753e Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Tue, 16 Aug 2022 15:26:19 -0400 Subject: psbt: Only include m_tap_tree if it has scripts Github-Pull: #25858 Rebased-From: 30ff25cf37eec4b09ab40424eb5d6a4a80410955 --- src/script/standard.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/script') 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> 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. -- cgit v1.2.3