add some comments for debug only code

This commit is contained in:
vyzo 2021-07-06 13:23:12 +03:00
parent c4ae3e0c3d
commit dc8139a1d2

View File

@ -121,7 +121,7 @@ type SplitStore struct {
baseEpoch abi.ChainEpoch baseEpoch abi.ChainEpoch
warmupEpoch abi.ChainEpoch warmupEpoch abi.ChainEpoch
writeEpoch abi.ChainEpoch writeEpoch abi.ChainEpoch // for debug logging
coldPurgeSize int coldPurgeSize int
@ -529,6 +529,7 @@ func (s *SplitStore) HeadChange(_, apply []*types.TipSet) error {
return nil return nil
} }
// this is only used when debug logging is enabled
func (s *SplitStore) background() { func (s *SplitStore) background() {
ticker := time.NewTicker(time.Second) ticker := time.NewTicker(time.Second)
defer ticker.Stop() defer ticker.Stop()
@ -544,6 +545,7 @@ func (s *SplitStore) background() {
} }
} }
// this is only used when debug logging is enabled
func (s *SplitStore) updateWriteEpoch() { func (s *SplitStore) updateWriteEpoch() {
s.mx.Lock() s.mx.Lock()
defer s.mx.Unlock() defer s.mx.Unlock()