mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
outbound_session: fix bug causing nodes to get stuck in peer discovery
ie. if we have gold or white connections we should try to connect to them.
This commit is contained in:
@@ -296,9 +296,12 @@ impl Slot {
|
||||
self.slot,
|
||||
);
|
||||
|
||||
// Do peer discovery if we don't have a hostlist (first time connecting
|
||||
// to the network).
|
||||
if hosts.container.is_empty(HostColor::Grey).await {
|
||||
// Do peer discovery if we don't have any peers on the Grey, White or Gold list
|
||||
// (first time connecting to the network).
|
||||
if hosts.container.is_empty(HostColor::Grey).await &&
|
||||
hosts.container.is_empty(HostColor::White).await &&
|
||||
hosts.container.is_empty(HostColor::Gold).await
|
||||
{
|
||||
dnetev!(self, OutboundSlotSleeping, {
|
||||
slot: self.slot,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user