File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ void PSBTOutput::FromSignatureData(const SignatureData& sigdata)
249249 if (!sigdata.tr_spenddata .internal_key .IsNull ()) {
250250 m_tap_internal_key = sigdata.tr_spenddata .internal_key ;
251251 }
252- if (sigdata.tr_builder .has_value ()) {
252+ if (sigdata.tr_builder .has_value () && sigdata. tr_builder -> HasScripts () ) {
253253 m_tap_tree = sigdata.tr_builder ->GetTreeTuples ();
254254 }
255255 for (const auto & [pubkey, leaf_origin] : sigdata.taproot_misc_pubkeys ) {
Original file line number Diff line number Diff line change @@ -315,6 +315,8 @@ class TaprootBuilder
315315 TaprootSpendData GetSpendData () const ;
316316 /* * Returns a vector of tuples representing the depth, leaf version, and script */
317317 std::vector<std::tuple<uint8_t , uint8_t , CScript>> GetTreeTuples () const ;
318+ /* * Returns true if there are any tapscripts */
319+ bool HasScripts () const { return !m_branch.empty (); }
318320};
319321
320322/* * Given a TaprootSpendData and the output key, reconstruct its script tree.
You can’t perform that action at this time.
0 commit comments