mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-16 08:54:19 +02:00
psbt: Change default psbt version to 2
This commit is contained in:
@@ -1260,7 +1260,7 @@ public:
|
||||
std::optional<uint32_t> ComputeTimeLock() const;
|
||||
std::optional<CMutableTransaction> GetUnsignedTx() const;
|
||||
std::optional<Txid> GetUniqueID() const;
|
||||
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 {
|
||||
|
||||
@@ -761,6 +761,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)
|
||||
|
||||
Reference in New Issue
Block a user