forked from forks/go-ethereum
This PR improves error handling in the remotedb package by fixing two issues: 1. In the `Has` method, we now properly propagate errors instead of silently returning false. This makes the behavior more predictable and helps clients better understand when there are connection issues. 2. In the `New` constructor, we add a nil check for the client parameter to prevent potential panics. This follows Go best practices for constructor functions. These changes make the code more robust and follow Go's error handling idioms without requiring any changes to other parts of the codebase. Changes: - Modified `Has` method to return errors instead of silently returning false - Added nil check in `New` constructor - Fixed field name in constructor to match struct definition |
||
|---|---|---|
| .. | ||
| dbtest | ||
| leveldb | ||
| memorydb | ||
| pebble | ||
| remotedb | ||
| batch.go | ||
| database.go | ||
| iterator.go | ||