Merge pull request #498 from hermeznetwork/feature/update-txman

Update coordinator to work better under real net
This commit is contained in:
arnau
2021-01-20 17:33:57 +01:00
committed by GitHub
20 changed files with 667 additions and 311 deletions

View File

@@ -322,7 +322,6 @@ func (kvdb *KVDB) SetCurrentIdx(idx common.Idx) error {
func (kvdb *KVDB) MakeCheckpoint() error {
// advance currentBatch
kvdb.CurrentBatch++
log.Debugw("Making KVDB checkpoint", "batch", kvdb.CurrentBatch)
checkpointPath := path.Join(kvdb.path, fmt.Sprintf("%s%d", PathBatchNum, kvdb.CurrentBatch))

View File

@@ -101,7 +101,7 @@ func NewStateDB(pathDB string, keep int, typ TypeStateDB, nLevels int) (*StateDB
// Internally this advances & stores the current BatchNum, and then stores a
// Checkpoint of the current state of the StateDB.
func (s *StateDB) MakeCheckpoint() error {
log.Debugw("Making StateDB checkpoint", "batch", s.CurrentBatch()+1)
log.Debugw("Making StateDB checkpoint", "batch", s.CurrentBatch()+1, "type", s.Typ)
return s.db.MakeCheckpoint()
}