Skip to content

Commit b731972

Browse files
Update rpc_psbt.py
1 parent a41cb57 commit b731972

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/functional/rpc_psbt.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def run_test(self):
216216
dest_arg = [{self.nodes[0].getnewaddress(): 1}]
217217
min_tx_weight = 0
218218
assert_raises_rpc_error(-4, f"Maximum transaction weight must be between {min_tx_weight} and {MAX_STANDARD_TX_WEIGHT}", self.nodes[0].walletcreatefundedpsbt, [], dest_arg, 0, {"max_tx_weight": -1})
219-
assert_raises_rpc_error(-4, f"Maximum transaction weight must be between {min_tx_weight} and {MAX_STANDARD_TX_WEIGHT}", self.nodes[0].walletcreatefundedpsbt, [], dest_arg, 0, {"max_tx_weight": 0})
219+
assert_raises_rpc_error(-4, f"Maximum transaction weight must be between {min_tx_weight} and {MAX_STANDARD_TX_WEIGHT}", self.nodes[0].walletcreatefundedpsbt, [], dest_arg, 0, {"max_tx_weight": min_tx_weight - 1})
220220
assert_raises_rpc_error(-4, f"Maximum transaction weight must be between {min_tx_weight} and {MAX_STANDARD_TX_WEIGHT}", self.nodes[0].walletcreatefundedpsbt, [], dest_arg, 0, {"max_tx_weight": MAX_STANDARD_TX_WEIGHT + 1})
221221

222222
# Base transaction vsize: version (4) + locktime (4) + input count (1) + witness overhead (1) = 10 vbytes
@@ -225,9 +225,6 @@ def run_test(self):
225225
p2wpkh_output_vsize = 31
226226
# 1 vbyte for output count
227227
output_count = 1
228-
tx_weight_without_inputs = (base_tx_vsize + output_count + p2wpkh_output_vsize) * WITNESS_SCALE_FACTOR
229-
# min_tx_weight is greater than transaction weight without inputs
230-
assert_greater_than(min_tx_weight, tx_weight_without_inputs)
231228

232229
# In order to test for when the passed max weight is less than the transaction weight without inputs
233230
# Define destination with two outputs.

0 commit comments

Comments
 (0)