Skip to content

Commit

Permalink
chore(StakingListener): fix staking event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
D4mph1r committed Aug 6, 2024
1 parent cd8d102 commit d008197
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/handler/evm/utils/listenForStakingEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ const listenForStakingEvents = (
});
const startBlock = lastBlock;

logger.trace(
`${startBlock} -> ${latestBlock}: ${logs.length} TXs. Awaiting 10s`,
);

if (!logs.length) {
logger.trace(`${startBlock} -> ${latestBlock}: 0 TXs. Awaiting 10s`);
lastBlock = latestBlock;
lastBlock = latestBlock + 1;
await em.upsert(Block, {
chain: chainIdent,
contractAddress: staker,
Expand Down

0 comments on commit d008197

Please sign in to comment.