Browse Source

Load state before starting reactors.

pull/8127/head
M. J. Fromberger 2 years ago
parent
commit
ca70e0d75d
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      node/node.go

+ 8
- 8
node/node.go View File

@ -571,6 +571,14 @@ func (n *nodeImpl) OnStart(ctx context.Context) error {
}
}
state, err := n.stateStore.Load()
if err != nil {
return fmt.Errorf("loading state during service start: %w", err)
}
if err := n.evPool.Start(state); err != nil {
return err
}
for _, reactor := range n.services {
if reactor.IsRunning() {
continue
@ -580,14 +588,6 @@ func (n *nodeImpl) OnStart(ctx context.Context) error {
}
}
state, err := n.stateStore.Load()
if err != nil {
return fmt.Errorf("loading state during service start: %w", err)
}
if err := n.evPool.Start(state); err != nil {
return err
}
return nil
}


Loading…
Cancel
Save