Ensure chain notifier is started before accessed.

The use case comes from the RPC layer that is ready before the
chain notifier which is used in the sub server.
This commit is contained in:
Roei Erez
2020-04-30 12:54:33 +03:00
parent cfe0babd78
commit ae2c37e043
11 changed files with 75 additions and 0 deletions

View File

@@ -139,6 +139,9 @@ type ChainNotifier interface {
// ready, and able to receive notification registrations from clients.
Start() error
// Started returns true if this instance has been started, and false otherwise.
Started() bool
// Stops the concrete ChainNotifier. Once stopped, the ChainNotifier
// should disallow any future requests from potential clients.
// Additionally, all pending client notifications will be canceled