We create a "public network" that looks like so. Each channel is perfectly balanced, with 7 * unit funds on each side. 4 -- 5 | /| | / | | / | |/ | 6 -- 7 l1 is the payee, who will later issue some invoices. It arranges unp
(node_factory, bitcoind, executor)
| 4237 | @pytest.mark.openchannel('v2') |
| 4238 | @unittest.skipIf(True, "Temporarily disabled while flake diagnosed: blame Rusty!") |
| 4239 | def test_mpp_interference_2(node_factory, bitcoind, executor): |
| 4240 | ''' |
| 4241 | We create a "public network" that looks like so. |
| 4242 | Each channel is perfectly balanced, with 7 * unit |
| 4243 | funds on each side. |
| 4244 | |
| 4245 | 4 -- 5 |
| 4246 | | /| |
| 4247 | | / | |
| 4248 | | / | |
| 4249 | |/ | |
| 4250 | 6 -- 7 |
| 4251 | |
| 4252 | l1 is the payee, who will later issue some invoices. |
| 4253 | It arranges unpublished channels from the above public |
| 4254 | network: |
| 4255 | |
| 4256 | l5->l1: 7 * unit |
| 4257 | l6->l1: 5 * unit |
| 4258 | l4->l1: 3 * unit |
| 4259 | l7->l1: 2 * unit |
| 4260 | |
| 4261 | l2 and l3 are payers. |
| 4262 | They create some unpublished channels to the public network: |
| 4263 | |
| 4264 | l2->l4, l2->l6: 6 * unit each |
| 4265 | l3->l7, l3->l6: 6 * unit each |
| 4266 | |
| 4267 | Finally, l1 issues 6 * unit invoices, simultaneously, to l2 and l3. |
| 4268 | Both of them perform `pay` simultaneously, in order to test if |
| 4269 | they interfere with each other. |
| 4270 | |
| 4271 | This test then tries to check if both of them can pay, given |
| 4272 | that there is sufficient incoming capacity, and then some, |
| 4273 | to the payee, and the public network is perfectly balanced |
| 4274 | with more than sufficient capacity, as well. |
| 4275 | ''' |
| 4276 | opts = {'feerates': (1000, 1000, 1000, 1000)} |
| 4277 | |
| 4278 | l1, l2, l3, l4, l5, l6, l7 = node_factory.get_nodes(7, opts=opts) |
| 4279 | |
| 4280 | # Unit |
| 4281 | unit = Millisatoshi(11000 * 1000) |
| 4282 | |
| 4283 | # Build the public network. |
| 4284 | public_network = [l4.fundbalancedchannel(l5, unit * 14), |
| 4285 | l4.fundbalancedchannel(l6, unit * 14), |
| 4286 | l5.fundbalancedchannel(l6, unit * 14), |
| 4287 | l5.fundbalancedchannel(l7, unit * 14), |
| 4288 | l6.fundbalancedchannel(l7, unit * 14)] |
| 4289 | |
| 4290 | # Build unpublished channels to the merchant l1. |
| 4291 | l4.rpc.connect(l1.info['id'], 'localhost', l1.port) |
| 4292 | l5.rpc.connect(l1.info['id'], 'localhost', l1.port) |
| 4293 | l6.rpc.connect(l1.info['id'], 'localhost', l1.port) |
| 4294 | l7.rpc.connect(l1.info['id'], 'localhost', l1.port) |
| 4295 | |
| 4296 | # If we're 'dual-funding', turn off the reciprocal funding |
nothing calls this directly
no test coverage detected