| 175 | } |
| 176 | |
| 177 | static bool peer_made_progress(struct seeker *seeker) |
| 178 | { |
| 179 | const struct peer *peer = seeker->random_peer_softref; |
| 180 | |
| 181 | /* Has it made progress (at least one valid update per second)? If |
| 182 | * not, we assume it's finished, and if it hasn't, we'll end up |
| 183 | * querying backwards in next steps. */ |
| 184 | if (peer->gossip_counter |
| 185 | >= seeker->prev_gossip_count + GOSSIP_SEEKER_INTERVAL(seeker)) { |
| 186 | seeker->prev_gossip_count = peer->gossip_counter; |
| 187 | return true; |
| 188 | } |
| 189 | |
| 190 | return false; |
| 191 | } |
| 192 | |
| 193 | static void disable_gossip_stream(struct seeker *seeker, struct peer *peer) |
| 194 | { |
no outgoing calls
no test coverage detected