Skip to content

Commit

Permalink
revert: revert "return 0 height inside GetLastBlockHeight if there ar…
Browse files Browse the repository at this point in the history
…e no blocks" (#78)

## Description

fix #76 
I forgot to remove this section of codes lol

## Checklist
- [ ] Targeted PR against correct branch.
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Wrote unit tests.  
- [ ] Re-reviewed `Files changed` in the Github PR explorer.
  • Loading branch information
huichiaotsou authored and MonikaCat committed Jan 19, 2024
1 parent ec1295f commit 3d0d238
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions database/postgresql/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ func (db *Database) GetLastBlockHeight() (int64, error) {
return 0, fmt.Errorf("error while getting last block height, error: %s", err)
}

if height == 0 {
return 0, fmt.Errorf("cannot get block height, no blocks saved")
}

return height, nil
}

Expand Down

0 comments on commit 3d0d238

Please sign in to comment.