[#963] node: Go on initialization even deposit notary is hung

* Make makeAndWaitNotaryDeposit run asynchronously as worker
  during application boot-up.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-02-29 18:31:04 +03:00 committed by Evgenii Stratonikov
parent 6eb63cf5c7
commit b4cb54e7ed
4 changed files with 24 additions and 2 deletions

View file

@ -352,6 +352,12 @@ type internals struct {
log *logger.Logger
// Some methods that initialize node components may launch an asynchronous job,
// appending it to workers. That means despite application is already running,
// not all components completely initialized yet.
// initAppWG is used to control this situation.
initAppWG sync.WaitGroup
wg sync.WaitGroup
workers []worker
closers []closer