Skip to content

Backport importBatch error check fix #116

@macterra

Description

@macterra

Summary

In importBatch(), the error check and the "already processed" check are in the wrong order. If a batch has both error and imported set, it gets skipped as "already done" rather than recognized as errored.

Current

async function importBatch(item: DiscoveredItem, retry: boolean = false) {
    if (item.imported && item.processed) {
        return;
    }
    if (item.error && !retry) {
        return;
    }

Fix

async function importBatch(item: DiscoveredItem) {
    if (item.error) {
        return;
    }
    if (item.imported && item.processed) {
        return;
    }

File

services/mediators/satoshi/src/satoshi-mediator.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions