@atomiqlabs/chain-solana 13.0.10 → 13.0.11
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.
|
@@ -42,7 +42,10 @@ class SolanaBlocks extends SolanaModule_1.SolanaModule {
|
|
|
42
42
|
let slot = await this.root.Slots.getSlot(commitment);
|
|
43
43
|
for (let i = 0; i < 10; i++) {
|
|
44
44
|
const block = await this.getParsedBlock(slot).catch(e => {
|
|
45
|
-
|
|
45
|
+
const errorStr = e.toString();
|
|
46
|
+
if (errorStr.startsWith("SolanaJSONRPCError: failed to get block:") && (errorStr.includes("Block not available for slot") ||
|
|
47
|
+
errorStr.includes("was skipped") ||
|
|
48
|
+
errorStr.includes("missing in long-term storage"))) {
|
|
46
49
|
return null;
|
|
47
50
|
}
|
|
48
51
|
throw e;
|
package/package.json
CHANGED
|
@@ -46,7 +46,14 @@ export class SolanaBlocks extends SolanaModule {
|
|
|
46
46
|
|
|
47
47
|
for(let i=0;i<10;i++) {
|
|
48
48
|
const block = await this.getParsedBlock(slot).catch(e => {
|
|
49
|
-
|
|
49
|
+
const errorStr = e.toString();
|
|
50
|
+
if(
|
|
51
|
+
errorStr.startsWith("SolanaJSONRPCError: failed to get block:") && (
|
|
52
|
+
errorStr.includes("Block not available for slot") ||
|
|
53
|
+
errorStr.includes("was skipped") ||
|
|
54
|
+
errorStr.includes("missing in long-term storage")
|
|
55
|
+
)
|
|
56
|
+
) {
|
|
50
57
|
return null;
|
|
51
58
|
}
|
|
52
59
|
throw e;
|