MCPcopy
hub / github.com/canopy-network/canopy / purgeLssTombstones

Method purgeLssTombstones

store/store.go:537–553  ·  view source on GitHub ↗

purgeLssTombstones removes LSS tombstone entries using the current commit batch.

(keys [][]byte)

Source from the content-addressed store, hash-verified

535
536// purgeLssTombstones removes LSS tombstone entries using the current commit batch.
537func (s *Store) purgeLssTombstones(keys [][]byte) lib.ErrorI {
538 if len(keys) == 0 {
539 return nil
540 }
541 reader, ok := s.ss.reader.(*VersionedStore)
542 if !ok {
543 return nil
544 }
545 for _, key := range keys {
546 userKey := lib.Append(latestStatePrefix, key)
547 versionedKey := reader.makeVersionedKey(userKey, lssVersion)
548 if err := s.writer.Delete(versionedKey, nil); err != nil {
549 return ErrCommitDB(err)
550 }
551 }
552 return nil
553}

Callers 1

CommitMethod · 0.95

Calls 4

AppendFunction · 0.92
ErrCommitDBFunction · 0.85
makeVersionedKeyMethod · 0.80
DeleteMethod · 0.65

Tested by

no test coverage detected