|
|
@@ -26,15 +26,15 @@ The outbound session is responsible to ensure the hosts pool is populated, eithe
|
|
|
through currently connected nodes or using the seed session.
|
|
|
It performs this algorithm:
|
|
|
|
|
|
-1. Start $N$ slots, with each with `status = ACTIVE`
|
|
|
+1. Start $N$ slots, each set with `status = ACTIVE`
|
|
|
2. If no addresses matching our filters are in the hosts pool then:
|
|
|
- 1. Check the other slots are all `ACTIVE`, otherwise `status = SLEEP` and
|
|
|
+ 1. Check the other slots are all `ACTIVE`, otherwise let `status = SLEEP` and
|
|
|
wait for a wakeup signal.
|
|
|
- 2. If we have connections available in `p2p` then `status = DISCOVERY`
|
|
|
- otherwise `status = SEED`.
|
|
|
- 3. If `status = DISCOVERY` and the hosts pool is still empty then
|
|
|
- `status = SEED`.
|
|
|
- 4. If the hosts pool is still empty, then `status = SLEEP` and set a wakeup timer.
|
|
|
+ 2. If we have connections available in `p2p` then let `status = DISCOVERY`
|
|
|
+ otherwise let `status = SEED`.
|
|
|
+ 3. If `status ≟ DISCOVERY` and the hosts pool is still empty then
|
|
|
+ let `status = SEED`.
|
|
|
+ 4. If the hosts pool is still empty, then let `status = SLEEP` and set a wakeup timer.
|
|
|
4. Once finished, send the wakeup signal to the other slots and repeat the process.
|
|
|
|
|
|
The slots are able to communicate to each other through pipes to signal status changes
|