refactor(store/v2): updates from integration (#18633)

This commit is contained in:
Aleksandr Bezobchuk
2023-12-06 19:55:27 +00:00
committed by GitHub
parent 52bbf81724
commit 4b98d481cf
9 changed files with 205 additions and 66 deletions
+9
View File
@@ -40,11 +40,17 @@ func NewManager(
// SetStorageOptions sets the state storage options.
func (m *Manager) SetStorageOptions(opts Options) {
m.mtx.Lock()
defer m.mtx.Unlock()
m.storageOpts = opts
}
// SetCommitmentOptions sets the state commitment options.
func (m *Manager) SetCommitmentOptions(opts Options) {
m.mtx.Lock()
defer m.mtx.Unlock()
m.commitmentOpts = opts
}
@@ -113,6 +119,7 @@ func (m *Manager) Prune(height uint64) {
m.chStorage <- struct{}{}
}()
}
default:
m.logger.Debug("storage pruning is still running; skipping", "version", pruneHeight)
}
@@ -134,7 +141,9 @@ func (m *Manager) Prune(height uint64) {
m.chCommitment <- struct{}{}
}()
}
default:
m.logger.Debug("commitment pruning is still running; skipping", "version", pruneHeight)
}
}
}