(node)
| 248 | wait_for_grpc_start(l1) |
| 249 | |
| 250 | def connect(node): |
| 251 | p = Path(node.daemon.lightning_dir) / TEST_NETWORK |
| 252 | cert, key, ca = [f.read_bytes() for f in [ |
| 253 | p / 'client.pem', |
| 254 | p / 'client-key.pem', |
| 255 | p / "ca.pem"]] |
| 256 | |
| 257 | creds = grpc.ssl_channel_credentials( |
| 258 | root_certificates=ca, |
| 259 | private_key=key, |
| 260 | certificate_chain=cert, |
| 261 | ) |
| 262 | |
| 263 | channel = grpc.secure_channel( |
| 264 | f"localhost:{node.grpc_port}", |
| 265 | creds, |
| 266 | options=(('grpc.ssl_target_name_override', 'cln'),) |
| 267 | ) |
| 268 | return clnpb.NodeStub(channel) |
| 269 | |
| 270 | stub = connect(l1) |
| 271 | # This should work, it's the correct node |
no outgoing calls
no test coverage detected