- if (router != null) {
- this.peer_manager = PeerManager.of(channel_manager.as_ChannelMessageHandler(), router.as_RoutingMessageHandler(), keys_interface.get_node_secret(), random_data, logger);
+ this.net_graph = net_graph;
+ if (net_graph != null) {
+ //TODO: We really need to expose the Access here to let users prevent DoS issues
+ this.graph_msg_handler = NetGraphMsgHandler.of(net_graph, Option_AccessZ.none(), logger);
+ this.peer_manager = PeerManager.of(channel_manager.as_ChannelMessageHandler(),
+ graph_msg_handler.as_RoutingMessageHandler(),
+ keys_interface.get_node_secret(), random_data, logger, no_custom_messages.as_CustomMessageHandler());