Skip to content

Commit

Permalink
morph: drop inactive client mode, fix #2797
Browse files Browse the repository at this point in the history
Reconnect indefinitely. After the initial probe this should be the behavior
for client, we can not work without blockchain data so we must wait for it as
long as needed, not entering any "inactive" state where the node pretends to
be alive, but can't do anything.

This makes client context (including everything belonging to it) an atomically
updated thing, regular calls fetch it when needed and can break if there are no
current connection. Meanwhile notification processing thread can reconnect when
needed and restore functionality.

Signed-off-by: Roman Khimov <[email protected]>
  • Loading branch information
roman-khimov committed Nov 1, 2024
1 parent 70cd3af commit b593bf6
Show file tree
Hide file tree
Showing 9 changed files with 347 additions and 458 deletions.
3 changes: 0 additions & 3 deletions cmd/neofs-node/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,6 @@ func initBasics(c *cfg, key *keys.PrivateKey, stateStorage *state.PersistentStor
c.internalErr <- fmt.Errorf("restarting after morph connection was lost: %w", err)
}
}),
client.WithConnLostCallback(func() {
c.internalErr <- errors.New("morph connection has been lost")
}),
client.WithMinRequiredBlockHeight(fromSideChainBlock),
)
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions pkg/innerring/innerring.go
Original file line number Diff line number Diff line change
Expand Up @@ -1077,9 +1077,6 @@ func (s *Server) createClient(ctx context.Context, p chainParams, errChan chan<-
errChan <- fmt.Errorf("internal services' restart after RPC reconnection to the %s: %w", p.name, err)
}
}),
client.WithConnLostCallback(func() {
errChan <- fmt.Errorf("%s chain connection has been lost", p.name)
}),
client.WithMinRequiredBlockHeight(p.from),
}
if p.withAutoSidechainScope {
Expand Down
Loading

0 comments on commit b593bf6

Please sign in to comment.