Skip to content

Commit

Permalink
fix: cometbft schema (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler authored Mar 3, 2025
1 parent 9441a73 commit b432f38
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions integrations/tendermint/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,34 +124,6 @@ export default class Tendermint implements IRuntime {
);
}

// check if finalize_block_events are present if every event attribute
// has a mode and that every mode attribute is either of value
// "BeginBlock" or "EndBlock"
if (item.value.block_results.finalize_block_events) {
for (const event of item.value.block_results.finalize_block_events) {
const modeAttribute = event.attributes.find(
(attribute: any) => attribute.key === 'mode'
);

if (!modeAttribute) {
throw new Error(
`finalize_block_events contains events with no "mode" in ${event.type}`
);
}

if (
modeAttribute.value !== 'BeginBlock' &&
modeAttribute.value !== 'EndBlock'
) {
throw new Error(
`finalize_block_events contains invalid mode in ${
event.type
}: ${JSON.stringify(modeAttribute)}`
);
}
}
}

return true;
}

Expand Down

0 comments on commit b432f38

Please sign in to comment.