diff --git a/node/node.go b/node/node.go index da711beee..d77e90a3d 100644 --- a/node/node.go +++ b/node/node.go @@ -956,6 +956,13 @@ func (n *Node) OnStart() error { n.isListening = true + if n.config.FastSync.Version == "v0" { + // Start the real blockchain reactor separately since the switch uses the shim. + if err := n.bcReactor.Start(); err != nil { + return err + } + } + // Start the real state sync reactor separately since the switch uses the shim. if err := n.stateSyncReactor.Start(); err != nil { return err @@ -1007,6 +1014,13 @@ func (n *Node) OnStop() { n.Logger.Error("Error closing switch", "err", err) } + if n.config.FastSync.Version == "v0" { + // Stop the real blockchain reactor separately since the switch uses the shim. + if err := n.bcReactor.Stop(); err != nil { + n.Logger.Error("failed to stop the blockchain reactor", "err", err) + } + } + // Stop the real state sync reactor separately since the switch uses the shim. if err := n.stateSyncReactor.Stop(); err != nil { n.Logger.Error("failed to stop the state sync reactor", "err", err) diff --git a/test/maverick/node/node.go b/test/maverick/node/node.go index 74c1173f5..650628725 100644 --- a/test/maverick/node/node.go +++ b/test/maverick/node/node.go @@ -988,6 +988,13 @@ func (n *Node) OnStart() error { n.isListening = true + if n.config.FastSync.Version == "v0" { + // Start the real blockchain reactor separately since the switch uses the shim. + if err := n.bcReactor.Start(); err != nil { + return err + } + } + // Start the real state sync reactor separately since the switch uses the shim. if err := n.stateSyncReactor.Start(); err != nil { return err @@ -1039,6 +1046,13 @@ func (n *Node) OnStop() { n.Logger.Error("Error closing switch", "err", err) } + if n.config.FastSync.Version == "v0" { + // Stop the real blockchain reactor separately since the switch uses the shim. + if err := n.bcReactor.Stop(); err != nil { + n.Logger.Error("failed to stop the blockchain reactor", "err", err) + } + } + // Stop the real state sync reactor separately since the switch uses the shim. if err := n.stateSyncReactor.Stop(); err != nil { n.Logger.Error("failed to stop the state sync reactor", "err", err)