Throw error where most recent fetched signature has slot less than afterSlot
This commit is contained in:
parent
7fdb6d1a9a
commit
44b3b7027a
|
@ -228,8 +228,8 @@ async function main() {
|
|||
} catch (e: any) {
|
||||
notify('v3: ' + e.toString());
|
||||
console.log(e, e.stack);
|
||||
// Wait for 10 mins
|
||||
await sleep(10 * 60 * 1000);
|
||||
// Wait for 60 seconds
|
||||
await sleep(60 * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,11 @@ export async function getNewSignatures(
|
|||
signatures = signaturesInfo.map((x) => x['signature']);
|
||||
slots = signaturesInfo.map((x) => x['slot']);
|
||||
|
||||
if (signaturesInfo[0].slot < afterSlot) {
|
||||
// Possibly this happens when validators are switched at the endpoint?
|
||||
throw 'most recent fetched signature has slot less than afterSlot'
|
||||
}
|
||||
|
||||
console.log('slots ' + signaturesInfo[0].slot + ' to ' + signaturesInfo[signaturesInfo.length - 1].slot)
|
||||
console.log(
|
||||
new Date(
|
||||
|
|
Loading…
Reference in New Issue