Try to create a giant channel
(node_factory, bitcoind)
| 1156 | @pytest.mark.openchannel('v1') |
| 1157 | @pytest.mark.openchannel('v2') |
| 1158 | def test_funding_toolarge(node_factory, bitcoind): |
| 1159 | """Try to create a giant channel""" |
| 1160 | l1 = node_factory.get_node() |
| 1161 | l2 = node_factory.get_node(options={'dev-force-features': '-19'}) |
| 1162 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 1163 | |
| 1164 | # Send funds. |
| 1165 | amount = 2**24 |
| 1166 | bitcoind.rpc.sendtoaddress(l1.rpc.newaddr('bech32')['bech32'], amount / 10**8 + 0.01) |
| 1167 | bitcoind.generate_block(1) |
| 1168 | |
| 1169 | # Wait for it to arrive. |
| 1170 | wait_for(lambda: len(l1.rpc.listfunds()['outputs']) > 0) |
| 1171 | |
| 1172 | # Fail to open (too large) |
| 1173 | with pytest.raises(RpcError, match=r'Amount exceeded 16777215'): |
| 1174 | l1.rpc.fundchannel(l2.info['id'], amount) |
| 1175 | |
| 1176 | # This should work. |
| 1177 | amount = amount - 1 |
| 1178 | l1.rpc.fundchannel(l2.info['id'], amount) |
| 1179 | |
| 1180 | |
| 1181 | @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') |
nothing calls this directly
no test coverage detected