(node_factory, bitcoind, chainparams)
| 1174 | @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') |
| 1175 | @pytest.mark.openchannel('v2') |
| 1176 | def test_v2_open(node_factory, bitcoind, chainparams): |
| 1177 | l1, l2 = node_factory.get_nodes(2) |
| 1178 | |
| 1179 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 1180 | amount = 2**24 |
| 1181 | bitcoind.rpc.sendtoaddress(l1.rpc.newaddr('bech32')['bech32'], amount / 10**8 + 0.01) |
| 1182 | bitcoind.generate_block(1) |
| 1183 | # Wait for it to arrive. |
| 1184 | wait_for(lambda: len(l1.rpc.listfunds()['outputs']) > 0) |
| 1185 | |
| 1186 | l1.rpc.fundchannel(l2.info['id'], 'all') |
| 1187 | |
| 1188 | bitcoind.generate_block(1) |
| 1189 | sync_blockheight(bitcoind, [l1]) |
| 1190 | l1.daemon.wait_for_log(' to CHANNELD_NORMAL') |
| 1191 | |
| 1192 | # Send a payment over the channel |
| 1193 | p = l2.rpc.invoice(100000, 'testpayment', 'desc') |
| 1194 | l1.rpc.xpay(p['bolt11']) |
| 1195 | result = only_one(l1.rpc.listsendpays(payment_hash=p['payment_hash'])['payments']) |
| 1196 | assert(result['status'] == 'complete') |
| 1197 | |
| 1198 | |
| 1199 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected