Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
explicitly match validate result to ensure error is thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
joecaswell committed Mar 16, 2022
1 parent a3da2cf commit 173868c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blockchain_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1208,9 +1208,9 @@ attempt_fetch_snap_source_snapshot(BaseUrl, SnapInfo) ->
case validate_snapshot_file(SnapInfo) of
{ok, Filename} ->
{ok, Filename}
{invalid, Filename, Filepath ->
{invalid, Filename, Filepath} ->
_ = do_snap_source_download(build_url(BaseUrl, Filename), Filepath),
validate_snapshot_file(SnapInfo)
{ok, _} = validate_snapshot_file(SnapInfo)
end.

validate_snapshot_file(#snapshot_info{height = Height, file_hash = Hash,
Expand Down

0 comments on commit 173868c

Please sign in to comment.