Implemented and validated the separate Monero observation-worker path
This commit is contained in:
@@ -66,7 +66,7 @@ function rowDigest(observation: MoneroIncomingObservation): string {
|
||||
export async function persistMoneroObservationScan(pool: Pool, input: PersistObservationScanInput): Promise<PersistObservationScanResult> {
|
||||
const parsed = scanInputSchema.parse(input);
|
||||
const page = parsed.page;
|
||||
if (page.fromHeight > page.throughHeight || page.throughHeight !== page.walletHeight ||
|
||||
if (page.fromHeight > page.throughHeight || page.throughHeight > page.walletHeight ||
|
||||
page.throughHeight - page.fromHeight > MAX_SCAN_RANGE || parsed.expectedScanHeight - page.fromHeight > MAX_OVERLAP ||
|
||||
page.fromHeight > parsed.expectedScanHeight || page.throughHeight < parsed.expectedScanHeight) {
|
||||
throw new Error('Monero observation scan range is not contiguous with its durable cursor');
|
||||
|
||||
Reference in New Issue
Block a user