(node_factory, bitcoind, chainparams)
| 1116 | @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') |
| 1117 | @pytest.mark.openchannel('v2') |
| 1118 | def test_v2_open(node_factory, bitcoind, chainparams): |
| 1119 | l1, l2 = node_factory.get_nodes(2) |
| 1120 | |
| 1121 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 1122 | amount = 2**24 |
| 1123 | bitcoind.rpc.sendtoaddress(l1.rpc.newaddr()['bech32'], amount / 10**8 + 0.01) |
| 1124 | bitcoind.generate_block(1) |
| 1125 | # Wait for it to arrive. |
| 1126 | wait_for(lambda: len(l1.rpc.listfunds()['outputs']) > 0) |
| 1127 | |
| 1128 | l1.rpc.fundchannel(l2.info['id'], 'all') |
| 1129 | |
| 1130 | bitcoind.generate_block(1) |
| 1131 | sync_blockheight(bitcoind, [l1]) |
| 1132 | l1.daemon.wait_for_log(' to CHANNELD_NORMAL') |
| 1133 | |
| 1134 | # Send a payment over the channel |
| 1135 | p = l2.rpc.invoice(100000, 'testpayment', 'desc') |
| 1136 | l1.rpc.pay(p['bolt11']) |
| 1137 | result = l1.rpc.waitsendpay(p['payment_hash']) |
| 1138 | assert(result['status'] == 'complete') |
| 1139 | |
| 1140 | |
| 1141 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected