Skip to content

Commit 8039636

Browse files
committed
Update protocol stats less frequently
1 parent 2335d10 commit 8039636

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mainnet/processors/protocol/protocol-sql-simple.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export const protocolSqlSimpleProcessor = defineProcessor({
1010
processor.includeAllBlocks({ from: 15000000 })
1111
},
1212
process: async (ctx: Context) => {
13-
// Update once every ~5 minutes.
14-
if (ctx.blocks.find((b) => b.header.height % 25 === 0)) {
13+
// Update at head once every ~10 minutes.
14+
if (ctx.isHead && ctx.blocks.find((b) => b.header.height % 50 === 0)) {
1515
const minDate = startDate
1616
await upsertProtocolDailyStatDetails(ctx, minDate)
1717
await upsertProtocolDailyStats(ctx, minDate)

0 commit comments

Comments
 (0)