Skip to content
Unverified Commit d7466224 authored by Alexandru Gheorghe's avatar Alexandru Gheorghe Committed by GitHub
Browse files

gossip-support: add unittests for update authorities (#3258)



~The previous fix was actually incomplete because we update the
authorties only on the situation where we decided to reconnect because
we had a low connectivity issue. Now the problem is that
update_authority_ids use the list of connected peers, so on restart that
does contain anything, so calling immediately after
issue_connection_request won't detect all authorities, so we need to
also check every block as the comment said, but that did not match the
code.~

Actually the fix was correct the flow is follow if more than 1/3 of the
authorities can not be resolved we set last_failure and call
`ConnectToResolvedValidators`.

We will call UpdateAuthorities for all the authorities already connected
and for which we already know the address and for the ones that will
connect later on `PeerConnected` will have the AuthorityId field set,
because it is already known, so approval-distribution will update its
cache topology.

---------

Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
Co-authored-by: default avatarAlexander Samusev <[email protected]>
parent b79bf4fb
Pipeline #444669 failed with stages
in 1 hour, 14 minutes, and 24 seconds