mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
Merge bitcoin/bitcoin#25858: psbt: Only include PSBT_OUT_TAP_TREE when the output has a script path
9e386afb67tests: Test that PSBT_OUT_TAP_TREE is included correctly (Andrew Chow)30ff25cf37psbt: Only include m_tap_tree if it has scripts (Andrew Chow)0577d423adpsbt: Change m_tap_tree to store just the tuples (Andrew Chow)22c051ca70tests: Test that PSBT_OUT_TAP_TREE is combined correctly (Andrew Chow)7df6e1bb77psbt: Fix merging of m_tap_tree (Andrew Chow)0652dc53b2[BugFix]: Do not allow deserializing PSBT with empty PSBT_OUT_TAP_TREE (Jeremy Rubin) Pull request description: PSBT_OUT_TAP_TREE should not be included for outputs that do not have such a tree. This should be disallowed during parsing, as well as prior to serialization when the field is populated during updating. Also added some test cases. Alternative to #25856 ACKs for top commit: instagibbs: ACK9e386afb67darosior: ACK9e386afb67Tree-SHA512: ce5c02a69752d176dbd967c1e8d30129b1905c8f186aeeef034576c1de82059271a1ee846bd040f5be4e66bb77ba711dcf14ac1e597c5707d7e7e2293f6cfefb
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user