Skip to content

Commit 8615507

Browse files
committed
scripted-diff: rename DBErrors::RESCAN_REQUIRED to NEED_RESCAN
-BEGIN VERIFY SCRIPT- git grep -l 'RESCAN_REQUIRED' src | xargs sed -i 's/RESCAN_REQUIRED/NEED_RESCAN/g' -END VERIFY SCRIPT-
1 parent 571bb94 commit 8615507

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2560,7 +2560,7 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
25602560
{
25612561
error = strprintf(_("Wallet needed to be rewritten: restart %s to complete"), PACKAGE_NAME);
25622562
return nullptr;
2563-
} else if (nLoadWalletRet == DBErrors::RESCAN_REQUIRED) {
2563+
} else if (nLoadWalletRet == DBErrors::NEED_RESCAN) {
25642564
warnings.push_back(strprintf(_("Error reading %s! Transaction data may be missing or incorrect."
25652565
" Rescanning wallet."), walletFile));
25662566
rescan_required = true;

src/wallet/walletdb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
861861
}
862862

863863
if (rescan_required && result == DBErrors::LOAD_OK) {
864-
result = DBErrors::RESCAN_REQUIRED;
864+
result = DBErrors::NEED_RESCAN;
865865
} else if (fNoncriticalErrors && result == DBErrors::LOAD_OK) {
866866
result = DBErrors::NONCRITICAL_ERROR;
867867
}

src/wallet/walletdb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ enum class DBErrors
4949
TOO_NEW,
5050
LOAD_FAIL,
5151
NEED_REWRITE,
52-
RESCAN_REQUIRED
52+
NEED_RESCAN
5353
};
5454

5555
namespace DBKeys {

src/wallet/wallettool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static std::shared_ptr<CWallet> MakeWallet(const std::string& name, const fs::pa
7676
} else if (load_wallet_ret == DBErrors::NEED_REWRITE) {
7777
tfm::format(std::cerr, "Wallet needed to be rewritten: restart %s to complete", PACKAGE_NAME);
7878
return nullptr;
79-
} else if (load_wallet_ret == DBErrors::RESCAN_REQUIRED) {
79+
} else if (load_wallet_ret == DBErrors::NEED_RESCAN) {
8080
tfm::format(std::cerr, "Error reading %s! Some transaction data might be missing or"
8181
" incorrect. Wallet requires a rescan.",
8282
name);

0 commit comments

Comments
 (0)