@pythnetwork/price-pusher 8.0.1 → 8.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/solana/solana.js +2 -2
- package/package.json +3 -3
package/lib/solana/solana.js
CHANGED
|
@@ -17,9 +17,9 @@ class SolanaPriceListener extends interface_1.ChainPriceListener {
|
|
|
17
17
|
// Checking the health of the Solana connection by checking the last block time
|
|
18
18
|
// and ensuring it is not older than 30 seconds.
|
|
19
19
|
async checkHealth() {
|
|
20
|
-
const slot = await this.pythSolanaReceiver.connection.getSlot();
|
|
20
|
+
const slot = await this.pythSolanaReceiver.connection.getSlot("finalized");
|
|
21
21
|
const blockTime = await this.pythSolanaReceiver.connection.getBlockTime(slot);
|
|
22
|
-
if (blockTime === null || blockTime < Date.now() / 1000 -
|
|
22
|
+
if (blockTime === null || blockTime < Date.now() / 1000 - 50) {
|
|
23
23
|
throw new Error("Solana connection is unhealthy");
|
|
24
24
|
}
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pythnetwork/price-pusher",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"description": "Pyth Price Pusher",
|
|
5
5
|
"homepage": "https://pyth.network",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@mysten/sui": "^1.3.0",
|
|
64
64
|
"@pythnetwork/price-service-client": "1.9.0",
|
|
65
65
|
"@pythnetwork/price-service-sdk": "^1.7.1",
|
|
66
|
-
"@pythnetwork/pyth-fuel-js": "1.0.
|
|
66
|
+
"@pythnetwork/pyth-fuel-js": "1.0.7",
|
|
67
67
|
"@pythnetwork/pyth-sdk-solidity": "4.0.0",
|
|
68
68
|
"@pythnetwork/pyth-solana-receiver": "0.8.2",
|
|
69
69
|
"@pythnetwork/pyth-sui-js": "2.1.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"yaml": "^2.1.1",
|
|
81
81
|
"yargs": "^17.5.1"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "dd4c76ba50b6bbe7fb70e6f6420030ebd4443fa3"
|
|
84
84
|
}
|