Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: wait for comet node shutdown
cometbft's service Start() methods do not block while running, so we the errgroup.Go for this was returning almost right away. This meant that errgroup.Wait() did not wait for shutdown to complete. The effect was frequent errors from cometbft arising from one of our databases / key stores being shutdown too soon. This is now resolved and the dependencies `closers` aren't closed until the node is actually stopped. However, there is still an internal cometbft bug during block sync (before the nodes switches to consensus mode) because of an unsupervised goroutine, `blocksync.(*Reactor).poolRoutine`. I fixed this bug in blocksync/reactor.go and the errors go away. We may need to PR cometbft to get clean shutdown during block sync.
- Loading branch information