Skip to content

Commit f0a1d7c

Browse files
achow101vijaydasmp
authored andcommitted
Merge bitcoin#28787: init: completely remove -zapwallettxes (remaining hidden option)
5039c34 init: completely remove `-zapwallettxes` (remaining hidden option) (Sebastian Falbesoner) Pull request description: The `-zapwallettxes` functionality has been removed in v0.21.0 (see commit 3340dba / PR bitcoin#19671), with the parameter being kept as hidden option, to inform users via an exit error that `abandontransaction` should be used instead. As any guides that still suggest to use `-zapwallettxes` would refer to a Bitcoin Core version that is EOL since many years (i.e. <= v0.20.x), it is highly unlikely that the error caused by the option is still relevant for any user, hence it seems fine to remove it now. ACKs for top commit: achow101: ACK 5039c34 BrandonOdiwuor: ACK 5039c34 fanquake: ACK 5039c34 Tree-SHA512: e3ccc6918e0f8fa68dbd1a7ec4999cc2a44e28038711919fcddaf0727648c73a9ba0fb77674317147592a113fad20755d4e727f48176bc17b048fbdebad2d6c9
1 parent 0455eb8 commit f0a1d7c

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

src/wallet/init.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ void WalletInit::AddWalletOptions(ArgsManager& argsman) const
125125

126126
argsman.AddArg("-walletrejectlongchains", strprintf("Wallet will not create transactions that violate mempool chain limits (default: %u)", DEFAULT_WALLET_REJECT_LONG_CHAINS), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::WALLET_DEBUG_TEST);
127127
argsman.AddArg("-walletcrosschain", strprintf("Allow reusing wallet files across chains (default: %u)", DEFAULT_WALLETCROSSCHAIN), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::WALLET_DEBUG_TEST);
128-
129-
argsman.AddHiddenArgs({"-zapwallettxes"});
130128
}
131129

132130
bool WalletInit::ParameterInteraction() const
@@ -150,10 +148,6 @@ bool WalletInit::ParameterInteraction() const
150148
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
151149
}
152150

153-
if (gArgs.IsArgSet("-zapwallettxes")) {
154-
return InitError(Untranslated("-zapwallettxes has been removed. If you are attempting to remove a stuck transaction from your wallet, please use abandontransaction instead."));
155-
}
156-
157151
int rescan_mode = gArgs.GetIntArg("-rescan", 0);
158152
if (rescan_mode < 0 || rescan_mode > 2) {
159153
LogPrintf("%s: Warning: incorrect -rescan mode, falling back to default value.\n", __func__);

test/lint/check-doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
CMD_GREP_WALLET_HIDDEN_ARGS = r"git grep --function-context 'void DummyWalletInit::AddWalletOptions' -- {}".format(CMD_ROOT_DIR)
2424
CMD_GREP_DOCS = r"git grep --perl-regexp '{}' {}".format(REGEX_DOC, CMD_ROOT_DIR)
2525
# list unsupported, deprecated and duplicate args as they need no documentation
26-
SET_DOC_OPTIONAL = set(['-h', '-help', '-dbcrashratio', '-forcecompactdb', '-zapwallettxes'])
26+
SET_DOC_OPTIONAL = set(['-h', '-help', '-dbcrashratio', '-forcecompactdb'])
2727

2828

2929
def lint_missing_argument_documentation():

0 commit comments

Comments
 (0)