Browse Source

test_mpp_split: add tests for exclude_single_part_payments=False

patch-4
ThomasV 2 years ago
parent
commit
b8cb561d1a
  1. 8
      electrum/tests/test_mpp_split.py

8
electrum/tests/test_mpp_split.py

@ -37,6 +37,14 @@ class TestMppSplit(ElectrumTestCase):
splits[0].config
)
with self.subTest(msg="payment amount that does not require to be split"):
splits = mpp_split.suggest_splits(50_000_000, self.channels_with_funds, exclude_single_part_payments=False)
self.assertEqual({(0, 0): [50_000_000]}, splits[0].config)
self.assertEqual({(1, 1): [50_000_000]}, splits[1].config)
self.assertEqual({(2, 0): [50_000_000]}, splits[2].config)
self.assertEqual({(3, 2): [50_000_000]}, splits[3].config)
self.assertEqual(2, mpp_split.number_parts(splits[4].config))
with self.subTest(msg="do a payment with a larger amount than what is supported by a single channel"):
splits = mpp_split.suggest_splits(1_100_000_000, self.channels_with_funds, exclude_single_part_payments=False)
self.assertEqual(2, mpp_split.number_parts(splits[0].config))

Loading…
Cancel
Save