Skip to content

Commit

Permalink
fix: add prevalidation for snapshot chunk (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler authored Dec 15, 2023
1 parent 09ff476 commit 3cba83d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions integrations/tendermint-ssync/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ export default class TendermintSSync implements IRuntime {
throw new Error(`Value in data item is not defined: ${item.value}`);
}

// throw error if chunk is missing
if (!item.value.chunk) {
throw new Error(`Value in data item has no snapshot chunk`);
}

if (chunkIndex > 0) {
// throw error if one of those values is not null
if (
Expand Down

0 comments on commit 3cba83d

Please sign in to comment.