Skip to content

Commit

Permalink
Update pre-start script to trigger re-index for 0.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nmfretz committed Aug 28, 2024
1 parent 6666c74 commit 5d4e6b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ordinals/hooks/pre-start
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ if [[ -f "${APP_DATA_DIR}/index.redb" ]]; then
set_correct_permissions "${APP_DATA_DIR}"
fi

# re-index the ordinals data for runes
# for installs post 0.18.1 this file will be harmlessly created
if [[ ! -f "${APP_DATA_DIR}/AT_LEAST_0-18-1" ]]; then
# re-index ord on major version upgrades (so far in ord's history, this has been required on every major version update)
# for fresh installs this file will be harmlessly created
if [[ ! -f "${APP_DATA_DIR}/AT_LEAST_0-19-1" ]]; then
# delete index db for all bitcoin networks
for file in "${ORDINALS_DATA_DIR}/index.redb" "${ORDINALS_DATA_DIR}/testnet3/index.redb" "${ORDINALS_DATA_DIR}/regtest/index.redb" "${ORDINALS_DATA_DIR}/signet/index.redb"; do
if [[ -f "${file}" ]]; then
rm -f "${file}"
fi
done
touch "${APP_DATA_DIR}/AT_LEAST_0-18-1"
touch "${APP_DATA_DIR}/AT_LEAST_0-19-1"
fi

# migrate all wallet database files to ord/wallets, ord/testnet3/wallets, ord/regtest/wallets, and ord/signet/wallets for pre-0.18.2 versions: https://github.com/ordinals/ord/releases/tag/0.18.2
Expand Down

0 comments on commit 5d4e6b7

Please sign in to comment.