Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 48335a0

Browse files
authoredAug 8, 2023
Close evidence.db OnStop (celestiaorg#1210)
* CV OnStop close evidenceStore * CV OnStop print db close * CV add changelog * CV update changelog with attribution
1 parent cf23082 commit 48335a0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- `[node]` Close evidence.db OnStop ([cometbft/cometbft\#1210](https://github.com/cometbft/cometbft/pull/1210): @chillyvee)

‎node/node.go

+8
Original file line numberDiff line numberDiff line change
@@ -479,15 +479,23 @@ func (n *Node) OnStop() {
479479
}
480480
}
481481
if n.blockStore != nil {
482+
n.Logger.Info("Closing blockstore")
482483
if err := n.blockStore.Close(); err != nil {
483484
n.Logger.Error("problem closing blockstore", "err", err)
484485
}
485486
}
486487
if n.stateStore != nil {
488+
n.Logger.Info("Closing statestore")
487489
if err := n.stateStore.Close(); err != nil {
488490
n.Logger.Error("problem closing statestore", "err", err)
489491
}
490492
}
493+
if n.evidencePool != nil {
494+
n.Logger.Info("Closing evidencestore")
495+
if err := n.EvidencePool().Close(); err != nil {
496+
n.Logger.Error("problem closing evidencestore", "err", err)
497+
}
498+
}
491499
}
492500

493501
// ConfigureRPC makes sure RPC has all the objects it needs to operate.

0 commit comments

Comments
 (0)
Please sign in to comment.