Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit 7c56b58

Browse files
committed
fix: dereference on error
1 parent 042e7af commit 7c56b58

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

triedb/firewood/database.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ func (db *Database) Commit(root common.Hash, report bool) error {
310310
start := time.Now()
311311
// Commit the proposal to the database.
312312
if err := pCtx.Proposal.Commit(); err != nil {
313+
db.dereference(pCtx) // no longer committable
313314
return fmt.Errorf("firewood: error committing proposal %s: %w", root.Hex(), err)
314315
}
315316
ffiCommitCount.Inc(1)

0 commit comments

Comments
 (0)