Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

state: avoid has call and remove error shadowing in Get #1891

Merged
merged 1 commit into from
Oct 21, 2019

Conversation

janos
Copy link
Member

@janos janos commented Oct 18, 2019

This PR improves DBStore.Get method:

  • removes unnecessary leveldb Has call which is as expensive as Get and not needed
  • fixes real error shadowing while returning ErrNotFound only when the key is not found

@janos janos requested review from nonsense and acud October 18, 2019 13:40
@janos janos self-assigned this Oct 18, 2019
@janos janos added this to Backlog in Swarm Core - Sprint planning via automation Oct 18, 2019
@acud acud moved this from Backlog to In review (includes Documentation) in Swarm Core - Sprint planning Oct 21, 2019
@acud acud requested a review from skylenet October 21, 2019 07:55
@acud acud merged commit 9ad4ca6 into master Oct 21, 2019
Swarm Core - Sprint planning automation moved this from In review (includes Documentation) to Done Oct 21, 2019
@acud acud deleted the state-improve-get branch October 21, 2019 08:47
@acud acud added this to the 0.5.3 milestone Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants