Skip to content

Commit d290f4e

Browse files
authored
fix: use finalized commitment for blocktime (#2157)
* do it * do it
1 parent e5fda4b commit d290f4e

File tree

1 file changed

+1
-1
lines changed
  • governance/pyth_staking_sdk/src/utils

1 file changed

+1
-1
lines changed

governance/pyth_staking_sdk/src/utils/clock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Connection } from "@solana/web3.js";
33
import { EPOCH_DURATION } from "../constants";
44

55
export const getCurrentSolanaTimestamp = async (connection: Connection) => {
6-
const slot = await connection.getSlot();
6+
const slot = await connection.getSlot("finalized");
77
const blockTime = await connection.getBlockTime(slot);
88
if (blockTime === null) {
99
throw new Error("Block time is not available");

0 commit comments

Comments
 (0)