Skip to content

Commit

Permalink
Correctly return error. (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
cabrador authored May 20, 2024
1 parent 60d9336 commit cc6c29f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions db/destroyed_account_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ package db

import (
"encoding/binary"
"errors"
"fmt"

"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/opt"

"github.com/Fantom-foundation/Substate/types"
Expand Down Expand Up @@ -56,7 +54,10 @@ func (db *DestroyedAccountDB) SetDestroyedAccounts(block uint64, tx int, des []t

func (db *DestroyedAccountDB) GetDestroyedAccounts(block uint64, tx int) ([]types.Address, []types.Address, error) {
data, err := db.backend.Get(encodeDestroyedAccountKey(block, tx))
if err != nil && !errors.Is(err, leveldb.ErrNotFound) {
if data == nil {
return nil, nil, nil
}
if err != nil {
return nil, nil, err
}
list, err := DecodeAddressList(data)
Expand Down

0 comments on commit cc6c29f

Please sign in to comment.