core-lightning/connectd/queries.h
Rusty Russell 47584bd504 connectd: tie gossip query responses into ratelimiting code.
A bit tricky, since we get more than one message at a time.  However,
this just means we go over quota for a bit, and will get caught when
those are sent (we do this for a single message already, so it's not
that much worse).

Note: this not only limits sending, but it limits the actuall query
processing, which is nice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-07-10 12:21:19 +09:30

15 lines
532 B
C

#ifndef LIGHTNING_CONNECTD_QUERIES_H
#define LIGHTNING_CONNECTD_QUERIES_H
#include "config.h"
/* See if there's a query to respond to: if so, return some msgs */
const u8 **maybe_create_query_responses(const tal_t *ctx,
struct peer *peer,
struct gossmap *gossmap);
void handle_query_short_channel_ids(struct peer *peer, const u8 *msg);
void handle_query_channel_range(struct peer *peer, const u8 *msg);
void dev_set_max_scids_encode_size(struct daemon *daemon, const u8 *msg);
#endif /* LIGHTNING_CONNECTD_QUERIES_H */