| 63 | } |
| 64 | |
| 65 | static bool ratelimit(const struct routing_state *rstate, |
| 66 | u8 *tokens, u32 prev_timestamp, u32 new_timestamp) |
| 67 | { |
| 68 | *tokens = update_tokens(rstate, *tokens, prev_timestamp, new_timestamp); |
| 69 | |
| 70 | /* Now, if we can afford it, pass this message. */ |
| 71 | if (*tokens >= TOKENS_PER_MSG) { |
| 72 | *tokens -= TOKENS_PER_MSG; |
| 73 | return true; |
| 74 | } |
| 75 | return false; |
| 76 | } |
| 77 | |
| 78 | static const struct node_id * |
| 79 | pending_node_announce_keyof(const struct pending_node_announce *a) |
no test coverage detected