Skip to content

Commit

Permalink
Update src/mappings/primitives.ts
Browse files Browse the repository at this point in the history
added comment explaining why to return early in handleGenesis when the block is not the genesis

Co-authored-by: Bryan White <[email protected]>
  • Loading branch information
Alann27 and bryanchriswhite authored Oct 1, 2024
1 parent 7f37163 commit 3b0a113
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mappings/primitives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
export async function handleGenesis(block: CosmosBlock): Promise<void> {
const genesis: Genesis = require('../../genesis.json');

// IMPORTANT: Return early if this is not the genesis initial height as this is called on for block indexed!
if (block.block.header.height !== genesis.initial_height) {
return
}
Expand Down

0 comments on commit 3b0a113

Please sign in to comment.