(node)
| 412 | wait_for_grpc_start(l1) |
| 413 | |
| 414 | def connect(node): |
| 415 | p = Path(node.daemon.lightning_dir) / TEST_NETWORK |
| 416 | cert, key, ca = [f.read_bytes() for f in [ |
| 417 | p / 'client.pem', |
| 418 | p / 'client-key.pem', |
| 419 | p / "ca.pem"]] |
| 420 | |
| 421 | creds = grpc.ssl_channel_credentials( |
| 422 | root_certificates=ca, |
| 423 | private_key=key, |
| 424 | certificate_chain=cert, |
| 425 | ) |
| 426 | |
| 427 | channel = grpc.secure_channel( |
| 428 | f"localhost:{node.grpc_port}", |
| 429 | creds, |
| 430 | options=(('grpc.ssl_target_name_override', 'cln'),) |
| 431 | ) |
| 432 | return clnpb.NodeStub(channel) |
| 433 | |
| 434 | stub = connect(l1) |
| 435 | # This should work, it's the correct node |
no outgoing calls
no test coverage detected