psbt: Only include m_tap_tree if it has scripts

This commit is contained in:
Andrew Chow
2022-08-16 15:26:19 -04:00
committed by Andrew Chow
parent 0577d423ad
commit 30ff25cf37
2 changed files with 3 additions and 1 deletions

View File

@@ -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.