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)
249
249
if (!sigdata.tr_spenddata .internal_key .IsNull ()) {
250
250
m_tap_internal_key = sigdata.tr_spenddata .internal_key ;
251
251
}
252
- if (sigdata.tr_builder .has_value ()) {
252
+ if (sigdata.tr_builder .has_value () && sigdata. tr_builder -> HasScripts () ) {
253
253
m_tap_tree = sigdata.tr_builder ->GetTreeTuples ();
254
254
}
255
255
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
315
315
TaprootSpendData GetSpendData () const ;
316
316
/* * Returns a vector of tuples representing the depth, leaf version, and script */
317
317
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 (); }
318
320
};
319
321
320
322
/* * Given a TaprootSpendData and the output key, reconstruct its script tree.
You can’t perform that action at this time.
0 commit comments