test: test that create_self_transfer_multi respects target_vsize

This commit is contained in:
ismaelsadeeq 2024-06-22 13:16:23 +01:00
parent fc642c33ef
commit f6e88931f0
No known key found for this signature in database
GPG key ID: 0E3908F364989888

View file

@ -29,8 +29,11 @@ class FeatureFrameworkMiniWalletTest(BitcoinTestFramework):
utxo = wallet.get_utxo(mark_as_spent=False) utxo = wallet.get_utxo(mark_as_spent=False)
for target_vsize in [250, 500, 1250, 2500, 5000, 12500, 25000, 50000, 1000000, for target_vsize in [250, 500, 1250, 2500, 5000, 12500, 25000, 50000, 1000000,
248, 501, 1085, 3343, 5805, 12289, 25509, 55855, 999998]: 248, 501, 1085, 3343, 5805, 12289, 25509, 55855, 999998]:
tx = wallet.create_self_transfer(utxo_to_spend=utxo, target_vsize=target_vsize)["tx"] tx = wallet.create_self_transfer(utxo_to_spend=utxo, target_vsize=target_vsize)
assert_equal(tx.get_vsize(), target_vsize) assert_equal(tx['tx'].get_vsize(), target_vsize)
child_tx = wallet.create_self_transfer_multi(utxos_to_spend=[tx["new_utxo"]], target_vsize=target_vsize)
assert_equal(child_tx['tx'].get_vsize(), target_vsize)
def test_wallet_tagging(self): def test_wallet_tagging(self):
"""Verify that tagged wallet instances are able to send funds.""" """Verify that tagged wallet instances are able to send funds."""