Skip to content

Commit

Permalink
more fix per review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
brewmaster012 committed Sep 14, 2023
1 parent 7e8da80 commit 787d0d8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions common/ethereum/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (m *Proof) Delete(key []byte) error {
if bytes.Equal(m.Keys[i], key) {
found = true
index = i
continue
break
}
}
if !found {
Expand All @@ -73,15 +73,13 @@ func (m *Proof) Delete(key []byte) error {
}

func (m *Proof) Has(key []byte) (bool, error) {
found := false
for i := 0; i < len(m.Keys); i++ {
if bytes.Equal(m.Keys[i], key) {
found = true
continue

return true, nil
}
}

return found, nil
return false, nil
}

func (m *Proof) Get(key []byte) ([]byte, error) {
Expand Down

0 comments on commit 787d0d8

Please sign in to comment.