From 0874d708b3e5869aefd62ab56c7a0c8186657dbe Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 3 Jun 2025 10:44:26 +0200 Subject: [PATCH] core/rawdb/eradb: add godoc comment on derefAndClose --- core/rawdb/eradb/eradb.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/rawdb/eradb/eradb.go b/core/rawdb/eradb/eradb.go index 1f4ed60498..29e658798e 100644 --- a/core/rawdb/eradb/eradb.go +++ b/core/rawdb/eradb/eradb.go @@ -327,6 +327,8 @@ func (db *Store) doneWithFile(epoch uint64, entry *fileCacheEntry) { } } +// derefAndClose decrements the reference counter and closes the file +// when it hits zero. func (entry *fileCacheEntry) derefAndClose(epoch uint64) (closed bool) { entry.refcount-- if entry.refcount > 0 {