Skip to content

Commit

Permalink
bugfix: nil dereference in FileApiLite::GetEpoch
Browse files Browse the repository at this point in the history
  • Loading branch information
mitjat committed May 5, 2023
1 parent 614a824 commit 62832f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion storage/oasis/nodeapi/file/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ func (c *FileConsensusApiLite) GetEpoch(ctx context.Context, height int64) (beac
return &time, err
},
)
return *time, err
if err != nil {
return beacon.EpochInvalid, err
}
return *time, nil
}

func (c *FileConsensusApiLite) RegistryEvents(ctx context.Context, height int64) ([]nodeapi.Event, error) {
Expand Down

0 comments on commit 62832f0

Please sign in to comment.