What changed, and why it matters
This commit fixes a programming mistake where an error from deleting a database bucket was accidentally ignored. The function that drops an index now properly returns the error instead of continuing as if nothing went wrong. A silently ignored failure could leave an index partially deleted or in an inconsistent state, which might cause incorrect behavior later.
Treat as a reliability and data-integrity fix. Review whether any other database transaction return values in the same file are unchecked. No immediate exploit mitigation is indicated by the diff alone.
Security signals we found
dropped error return value now handled
database bucket deletion failure previously ignored
potential index state inconsistency after partial deletion
Evidence from the diff
In blockchain/indexers/manager.go, the dropIndex function iterates over nested buckets and deletes each one inside a database.View/Update transaction. The return value of that transaction closure was not being checked before the next loop iteration or before proceeding to extra deinitialization. The patch adds an explicit if err != nil { return err } check after the transaction call. This is a classic dropped-error bug. The security impact is indirect: a failed bucket deletion could leave stale index data, potentially causing subsequent index operations to behave incorrectly or produce inconsistent state.
Changed components
blockchain/indexers/manager.godropIndex functionindex deletion / reindexing pathInspect captured patch +3 / −0
diff --git a/blockchain/indexers/manager.go b/blockchain/indexers/manager.go
index 28f608f..f073005 100644
--- a/blockchain/indexers/manager.go
+++ b/blockchain/indexers/manager.go
@@ -668,6 +668,9 @@ func dropIndex(db database.DB, idxKey []byte, idxName string, interrupt <-chan s
}
return bucket.DeleteBucket(bucketName[len(bucketName)-1])
})
+ if err != nil {
+ return err
+ }
}
// Call extra index specific deinitialization for the transaction index.
Why this scored 31/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.