mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Delete old checkpoints in stateDB automatically
Introduce a constructor parameter for the StateDB called `keep`, which tells how many checkpoints to keep. When doing a new checkpoint, if the number of existing checkpoints exeeds `keep`, the oldest ones will be deleted.
This commit is contained in:
@@ -98,7 +98,7 @@ func newTestModules(t *testing.T) modules {
|
||||
syncDBPath, err = ioutil.TempDir("", "tmpSyncDB")
|
||||
require.NoError(t, err)
|
||||
deleteme = append(deleteme, syncDBPath)
|
||||
syncStateDB, err := statedb.NewStateDB(syncDBPath, statedb.TypeSynchronizer, 48, chainID)
|
||||
syncStateDB, err := statedb.NewStateDB(syncDBPath, 128, statedb.TypeSynchronizer, 48, chainID)
|
||||
assert.NoError(t, err)
|
||||
|
||||
pass := os.Getenv("POSTGRES_PASS")
|
||||
|
||||
Reference in New Issue
Block a user