mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-10 14:48:46 +02:00
wallet, test: remove -walletrbf startup option from rpc_psbt.py
Also, include PSBT_GLOBAL_FALLBACK_LOCKTIME key/value while making the PSBT v2 blank for combinepsbt RPC.
This commit is contained in:
@@ -71,8 +71,8 @@ class PSBTTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 3
|
||||
self.extra_args = [
|
||||
["-walletrbf=1"],
|
||||
["-walletrbf=0", "-changetype=legacy"],
|
||||
[],
|
||||
["-changetype=legacy"],
|
||||
[]
|
||||
]
|
||||
# whitelist peers to speed up tx relay / mempool sync
|
||||
@@ -881,14 +881,6 @@ class PSBTTest(BitcoinTestFramework):
|
||||
assert "bip32_derivs" in psbt_in
|
||||
assert_equal(decoded_psbt["fallback_locktime"], 0)
|
||||
|
||||
# Same construction without optional arguments, for a node with -walletrbf=0
|
||||
unspent1 = self.nodes[1].listunspent()[0]
|
||||
psbtx_info = self.nodes[1].walletcreatefundedpsbt([{"txid":unspent1["txid"], "vout":unspent1["vout"]}], [{self.nodes[2].getnewaddress():unspent1["amount"]+1}], block_height, {"add_inputs": True})
|
||||
decoded_psbt = self.nodes[1].decodepsbt(psbtx_info["psbt"])
|
||||
for psbt_in in decoded_psbt["inputs"]:
|
||||
assert_greater_than(psbt_in["sequence"], MAX_BIP125_RBF_SEQUENCE)
|
||||
assert "bip32_derivs" in psbt_in
|
||||
|
||||
# Make sure change address wallet does not have P2SH innerscript access to results in success
|
||||
# when attempting BnB coin selection
|
||||
self.nodes[0].walletcreatefundedpsbt([], [{self.nodes[2].getnewaddress():unspent["amount"]+1}], block_height+2, {"changeAddress":self.nodes[1].getnewaddress()}, False)
|
||||
|
||||
@@ -168,6 +168,7 @@ class PSBT:
|
||||
PSBT_GLOBAL_INPUT_COUNT: self.g.map[PSBT_GLOBAL_INPUT_COUNT],
|
||||
PSBT_GLOBAL_OUTPUT_COUNT: self.g.map[PSBT_GLOBAL_OUTPUT_COUNT],
|
||||
PSBT_GLOBAL_VERSION: self.g.map[PSBT_GLOBAL_VERSION],
|
||||
PSBT_GLOBAL_FALLBACK_LOCKTIME: self.g.map[PSBT_GLOBAL_FALLBACK_LOCKTIME],
|
||||
})
|
||||
|
||||
new_i = []
|
||||
|
||||
@@ -31,7 +31,7 @@ class WalletSendTest(BitcoinTestFramework):
|
||||
# whitelist peers to speed up tx relay / mempool sync
|
||||
self.noban_tx_relay = True
|
||||
self.supports_cli = False
|
||||
self.extra_args = [["-walletrbf=1", "-datacarriersize=16", "-deprecatedrpc=bip125"]] * self.num_nodes
|
||||
self.extra_args = [["-datacarriersize=16", "-deprecatedrpc=bip125"]] * self.num_nodes
|
||||
getcontext().prec = 8 # Satoshi precision for Decimal
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
|
||||
Reference in New Issue
Block a user