(node_factory, qty=2, fundamount=1000000, balanced=True)
| 559 | # |
| 560 | # The channels for the second node are returned in chanids |
| 561 | def make_chans(node_factory, qty=2, fundamount=1000000, balanced=True): |
| 562 | nodes = node_factory.line_graph(qty + 1, fundamount=fundamount, opts={'allow_bad_gossip': True}) |
| 563 | chanids = [] |
| 564 | |
| 565 | for i in range(len(nodes) - 1): |
| 566 | nodes[i].daemon.wait_for_log(' to CHANNELD_NORMAL') |
| 567 | if balanced: |
| 568 | inv = nodes[i + 1].rpc.invoice(1000 * fundamount // 2, 'balance', 'balance') |
| 569 | nodes[i].rpc.xpay(inv['bolt11']) |
| 570 | |
| 571 | chanids.insert(0, nodes[1].get_channel_id(nodes[0])) |
| 572 | if qty > 1: |
| 573 | chanids.insert(0, nodes[1].get_channel_id(nodes[2])) |
| 574 | |
| 575 | return [nodes, chanids] |
| 576 | |
| 577 | |
| 578 | def verify_chans(nodes, bitcoind, txid, chanids, fee, expected_balances=None, fee_multiplier=None): |
no test coverage detected