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

Commit 173868c

Browse files
committed
explicitly match validate result to ensure error is thrown
1 parent a3da2cf commit 173868c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/blockchain_worker.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,9 +1208,9 @@ attempt_fetch_snap_source_snapshot(BaseUrl, SnapInfo) ->
12081208
case validate_snapshot_file(SnapInfo) of
12091209
{ok, Filename} ->
12101210
{ok, Filename}
1211-
{invalid, Filename, Filepath ->
1211+
{invalid, Filename, Filepath} ->
12121212
_ = do_snap_source_download(build_url(BaseUrl, Filename), Filepath),
1213-
validate_snapshot_file(SnapInfo)
1213+
{ok, _} = validate_snapshot_file(SnapInfo)
12141214
end.
12151215

12161216
validate_snapshot_file(#snapshot_info{height = Height, file_hash = Hash,

0 commit comments

Comments
 (0)