Implemented and validated the separate Monero observation-worker path

This commit is contained in:
2026-10-22 09:38:20 -04:00
parent 12f80fdc53
commit 158981e965
12 changed files with 253 additions and 12 deletions
+1 -1
View File
@@ -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');