mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-06 19:06:42 +01:00
Improve stateDB reliability
- Close StateDB when stopping the node - Lock the StateDB when doing checkpoints to avoid multiple instances of oppening the pebble DB at the same time.
This commit is contained in:
@@ -262,6 +262,11 @@ func NewSynchronizer(ethClient eth.ClientInterface, historyDB *historydb.History
|
||||
return s, s.init()
|
||||
}
|
||||
|
||||
// StateDB returns the inner StateDB
|
||||
func (s *Synchronizer) StateDB() *statedb.StateDB {
|
||||
return s.stateDB
|
||||
}
|
||||
|
||||
// Stats returns a copy of the Synchronizer Stats. It is safe to call Stats()
|
||||
// during a Sync call
|
||||
func (s *Synchronizer) Stats() *Stats {
|
||||
|
||||
Reference in New Issue
Block a user