(node_factory)
| 613 | |
| 614 | |
| 615 | def test_grpc_custommsg_notification(node_factory): |
| 616 | l1, l2 = node_factory.get_nodes(2) |
| 617 | |
| 618 | # Test the connect notification |
| 619 | custommsg_stream = l1.grpc.SubscribeCustomMsg(clnpb.StreamCustomMsgRequest()) |
| 620 | l2.connect(l1) |
| 621 | |
| 622 | # Send the custom-msg to node l1 |
| 623 | # The payload doesn't matter. |
| 624 | # It just needs to be valid hex which encodes to an odd BOLT-8 msg id |
| 625 | l2.rpc.sendcustommsg(l1.info["id"], "3131313174657374") |
| 626 | |
| 627 | for custommsg in custommsg_stream: |
| 628 | # Ignore peer storage message! |
| 629 | if custommsg.payload.hex().startswith('0007'): |
| 630 | continue |
| 631 | assert custommsg.peer_id.hex() == l2.info["id"] |
| 632 | assert custommsg.payload.hex() == "3131313174657374" |
| 633 | assert custommsg.payload == b"1111test" |
| 634 | break |
| 635 | |
| 636 | |
| 637 | def test_bip353(node_factory): |
nothing calls this directly
no test coverage detected