Add optional block_start parameter to check mode

This commit is contained in:
Joe Uhren
2021-11-21 19:15:42 -07:00
parent e5e1887401
commit f0908fd176
3 changed files with 29 additions and 4 deletions
+2 -1
View File
@@ -410,6 +410,7 @@ Usage: scripts/sync.sh /path/to/node [mode]
Mode: (required)
update Updates index from last sync to current block
check Checks index for (and adds) any missing transactions/addresses
Optional parameter: block number to start checking from
reindex Clears index then resyncs from genesis to current block
reindex-rich Clears and recreates the richlist data
reindex-txcount Rescan and flatten the tx count value for faster access
@@ -438,7 +439,7 @@ A number of npm scripts are included with the explorer for easy syncing of the v
A small handful of useful scripts are also included to assist in solving various issues you may experience with the explorer:
- `npm run check-blocks`: Recheck all previously synced blocks by comparing against the wallet daemon to look for and add any missing transactions/addresses. :warning: **WARNING:** This can take a very long time depending on the length of the blockchain and is generally not recommended unless absolutely necessary. Furthermore, while you are checking for missing data, you will be unable to sync new blocks into the explorer until the check command has finished. If you do find missing transactions with this check (other than new data since last sync), this likely means that `sync.update_timeout` in `settings.json` is set too low.
- `npm run check-blocks`: Recheck all previously synced blocks by comparing against the wallet daemon to look for and add any missing transactions/addresses. Optional parameter: block number to start checking from. Example: `npm run check-blocks 1000` will begin the check starting at block 1000. :warning: **WARNING:** This can take a very long time depending on the length of the blockchain and is generally not recommended unless absolutely necessary. Furthermore, while you are checking for missing data, you will be unable to sync new blocks into the explorer until the check command has finished. If you do find missing transactions with this check (other than new data since last sync), this likely means that `sync.update_timeout` in `settings.json` is set too low.
- `npm run reindex`: Delete all blocks, transactions and addresses, and resync from genesis to current block. :warning: **WARNING:** This will wipe out all blockchain-related data from the explorer. It is recommended to [backup the explorer database](#backup-database-script) before continuing with this command.
- `npm run reindex-rich`: Clears and recreates the richlist data for the top 100 coin holders page. Rarely needed, but can be useful for debugging or if you are certain the richlist data is incorrect for some reason.
- `npm run reindex-txcount`: Recalculate the count of transactions stored in `stats.txes` by recounting the txes stored in the mongo database. Rarely needed, but can be useful for debugging or if you notice the main list of transactions is showing the wrong number of entries. If this value is off for some reason, you will not be able to page back to the 1st blocks on the main list of transactions for example.