| 780 | } |
| 781 | |
| 782 | static void check_probe(struct seeker *seeker, |
| 783 | void (*restart)(struct seeker *seeker)) |
| 784 | { |
| 785 | struct peer *peer = seeker->random_peer_softref; |
| 786 | |
| 787 | /* It might have died, pick another. */ |
| 788 | if (!peer) { |
| 789 | restart(seeker); |
| 790 | return; |
| 791 | } |
| 792 | |
| 793 | /* Is peer making progress with responses? */ |
| 794 | if (peer_made_progress(seeker)) |
| 795 | return; |
| 796 | |
| 797 | status_peer_debug(&peer->id, |
| 798 | "has only moved gossip %zu->%zu for probe, giving up on it", |
| 799 | seeker->prev_gossip_count, peer->gossip_counter); |
| 800 | clear_softref(seeker, &seeker->random_peer_softref); |
| 801 | restart(seeker); |
| 802 | } |
| 803 | |
| 804 | static bool peer_is_not_gossipper(const struct peer *peer) |
| 805 | { |
no test coverage detected