Add some funds, fund a channel using all funds, make sure no funds remain
(node_factory, bitcoind)
| 1001 | @pytest.mark.openchannel('v1') |
| 1002 | @pytest.mark.openchannel('v2') |
| 1003 | def test_funding_all(node_factory, bitcoind): |
| 1004 | """Add some funds, fund a channel using all funds, make sure no funds remain |
| 1005 | """ |
| 1006 | l1, l2 = node_factory.line_graph(2, fundchannel=False) |
| 1007 | |
| 1008 | l1.fundwallet(0.1 * 10**8) |
| 1009 | bitcoind.generate_block(1) |
| 1010 | sync_blockheight(bitcoind, [l1]) |
| 1011 | |
| 1012 | outputs = l1.db_query('SELECT value FROM outputs WHERE status=0;') |
| 1013 | assert only_one(outputs)['value'] == 10000000 |
| 1014 | |
| 1015 | l1.rpc.fundchannel(l2.info['id'], "all") |
| 1016 | |
| 1017 | outputs = l1.db_query('SELECT value FROM outputs WHERE status=0;') |
| 1018 | assert len(outputs) == 0 |
| 1019 | |
| 1020 | |
| 1021 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected