Skip to content

Make backup number a variable #33

@christroutner

Description

@christroutner

When there is a block re-org or a UTXO conflict, the slp-indexer is designed to handle it by deleting the current LevelDB and restoring a zip backup, then re-indexing from the last backup. If there is no backup, it starts indexing from SLP genesis (around block 550,000).

This is not ideal behavior. If there are older zip files, the indexer will loop through the backups until a valid backup is found and indexing completes successfully. Occasionally a bad zip file will get created. This problem is compounded when the DELETE_BACKUP environment variable is set, which ensures that only one backup is held at a time.

The DELETE_BACKUP environment variable should be replaced with a number indicating the number of backups that are held on hand. A safe number is probably 5, which would allow the indexer to fall-back to several backup files, in case the latest one or two are corrupt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions