bitromortac
4 years ago
No known key found for this signature in database
GPG Key ID: 1965063FC13BEBE2
1 changed files with
5 additions and
2 deletions
-
electrum/tests/test_mpp_split.py
|
|
@ -13,8 +13,6 @@ class TestMppSplit(ElectrumTestCase): |
|
|
|
super().setUp() |
|
|
|
# to make tests reproducible: |
|
|
|
random.seed(0) |
|
|
|
# undo side effect |
|
|
|
mpp_split.PART_PENALTY = PART_PENALTY |
|
|
|
self.channels_with_funds = { |
|
|
|
0: 1_000_000_000, |
|
|
|
1: 500_000_000, |
|
|
@ -22,6 +20,11 @@ class TestMppSplit(ElectrumTestCase): |
|
|
|
3: 101_000_000, |
|
|
|
} |
|
|
|
|
|
|
|
def tearDown(self): |
|
|
|
super().tearDown() |
|
|
|
# undo side effect |
|
|
|
mpp_split.PART_PENALTY = PART_PENALTY |
|
|
|
|
|
|
|
def test_suggest_splits(self): |
|
|
|
with self.subTest(msg="do a payment with the maximal amount spendable over a single channel"): |
|
|
|
splits = mpp_split.suggest_splits(1_000_000_000, self.channels_with_funds, exclude_single_parts=True) |
|
|
|