mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
psbt: Change default psbt version to 2
This commit is contained in:
parent
00a49ca94e
commit
71d28489f8
2 changed files with 4 additions and 1 deletions
|
@ -1332,7 +1332,7 @@ struct PartiallySignedTransaction
|
|||
CMutableTransaction GetUnsignedTx() const;
|
||||
uint256 GetUniqueID() const;
|
||||
PartiallySignedTransaction() = default;
|
||||
explicit PartiallySignedTransaction(const CMutableTransaction& tx, uint32_t version = 0);
|
||||
explicit PartiallySignedTransaction(const CMutableTransaction& tx, uint32_t version = 2);
|
||||
|
||||
template <typename Stream>
|
||||
inline void Serialize(Stream& s) const {
|
||||
|
|
|
@ -489,6 +489,9 @@ class PSBTTest(BitcoinTestFramework):
|
|||
# Create a psbt spending outputs from nodes 1 and 2
|
||||
psbt_orig = self.nodes[0].createpsbt([utxo1, utxo2], {self.nodes[0].getnewaddress():25.999})
|
||||
|
||||
# Check that the default psbt version is 2
|
||||
assert_equal(self.nodes[0].decodepsbt(psbt_orig)["psbt_version"], 2)
|
||||
|
||||
# Update psbts, should only have data for one input and not the other
|
||||
psbt1 = self.nodes[1].walletprocesspsbt(psbt_orig, False, "ALL")['psbt']
|
||||
psbt1_decoded = self.nodes[0].decodepsbt(psbt1)
|
||||
|
|
Loading…
Add table
Reference in a new issue