mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-23 03:17:25 +08:00
fix: nil ref on consensus halts for non-archive nodes
This commit is contained in:
parent
3eb7477ff8
commit
30a76203d3
@ -202,11 +202,13 @@ func (e *GlobalConsensusEngine) eventDistributorLoop() {
|
||||
if ok && data.Message != "" {
|
||||
e.logger.Error(data.Message)
|
||||
e.halt()
|
||||
if err := e.stateMachine.Stop(); err != nil {
|
||||
e.logger.Error(
|
||||
"error occurred while halting consensus",
|
||||
zap.Error(err),
|
||||
)
|
||||
if e.stateMachine != nil {
|
||||
if err := e.stateMachine.Stop(); err != nil {
|
||||
e.logger.Error(
|
||||
"error occurred while halting consensus",
|
||||
zap.Error(err),
|
||||
)
|
||||
}
|
||||
}
|
||||
go func() {
|
||||
for {
|
||||
@ -230,11 +232,13 @@ func (e *GlobalConsensusEngine) eventDistributorLoop() {
|
||||
zap.Error(data.Error),
|
||||
)
|
||||
e.halt()
|
||||
if err := e.stateMachine.Stop(); err != nil {
|
||||
e.logger.Error(
|
||||
"error occurred while halting consensus",
|
||||
zap.Error(err),
|
||||
)
|
||||
if e.stateMachine != nil {
|
||||
if err := e.stateMachine.Stop(); err != nil {
|
||||
e.logger.Error(
|
||||
"error occurred while halting consensus",
|
||||
zap.Error(err),
|
||||
)
|
||||
}
|
||||
}
|
||||
go func() {
|
||||
for {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user