diff --git a/db.go b/db.go index 87b5ed253..23e4364f6 100644 --- a/db.go +++ b/db.go @@ -520,6 +520,13 @@ func validateBlockSequence(bs []DiskBlock) error { return nil } +func (db *DB) Blocks() []DiskBlock { + db.mtx.RLock() + defer db.mtx.RUnlock() + + return db.blocks +} + // Close the partition. func (db *DB) Close() error { close(db.stopc)