-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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.