Skip to content

Commit 87c3623

Browse files
committed
fix: address issues raised in review
1 parent 6384680 commit 87c3623

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/price_pusher/src/solana/solana.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ export class SolanaPriceListener extends ChainPriceListener {
3535
const blockTime = await this.pythSolanaReceiver.connection.getBlockTime(
3636
slot
3737
);
38-
if (blockTime !== undefined || blockTime < Date.now() / 1000 - 30) {
38+
if (blockTime === undefined || blockTime < Date.now() / 1000 - 30) {
3939
throw new Error("Solana connection is unhealthy");
4040
}
4141
}
4242

4343
async start() {
4444
// Frequently check the RPC connection to ensure it is healthy
45-
setInterval(() => this.checkHealth.bind(this), 5000);
45+
setInterval(this.checkHealth.bind(this), 5000);
4646

4747
await super.start();
4848
}
@@ -125,6 +125,7 @@ export class SolanaPricePusher implements IPricePusher {
125125
this.logger.info({ signatures }, "updatePriceFeed successful");
126126
} catch (err: any) {
127127
this.logger.error(err, "updatePriceFeed failed");
128+
return;
128129
}
129130
}
130131
}

0 commit comments

Comments
 (0)