diff options
author | fanquake <fanquake@gmail.com> | 2020-10-19 10:38:48 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-10-19 11:07:11 +0800 |
commit | a1e0359618e3a66d0156d2b0a4702bc55f957a3f (patch) | |
tree | 0c4632f89e2bf3c3e0aaccb0d8159ee20aff7f0e /src | |
parent | c92aa8357c36a63b7a97d8a1bc09036a0d2661b3 (diff) | |
parent | 95fedd33a23d6cb7542378afef229965f1ebfd68 (diff) |
Merge #19986: refactor: clean up -Wlogical-op warning in wallet/scriptpubkeyman.cp
95fedd33a23d6cb7542378afef229965f1ebfd68 refactor: Clean up -Wlogical-op warning (maskoficarus)
Pull request description:
This is a quick patch that fixes #19912 . This change prevents a -Wlogical-op warning that occurs because we're treating a const int value as a boolean. There's no sense checking if a non-zero constant has a value, so I've removed the check.
#18836 also addresses the same warning, but has a larger scope and will require more review. This pull request will act as a patch to prevent this compile warning until 18836 is merged.
ACKs for top commit:
MarcoFalke:
review ACK 95fedd33a23d6cb7542378afef229965f1ebfd68
hebasto:
ACK 95fedd33a23d6cb7542378afef229965f1ebfd68, tested on Linux Mint 20 (x86_64):
Tree-SHA512: 13a9d7f7cb472f4c22a01ca2f9771a75267ff769bdae9d0dc6b2c7f3b05369f6dfa859be2b172b39c15ede6c44cddf556380b3565e42850faa65ccd3fe6e175b
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/scriptpubkeyman.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index b7c70dac3a..188289b010 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -453,7 +453,7 @@ bool LegacyScriptPubKeyMan::Upgrade(int prev_version, bilingual_str& error) hd_upgrade = true; } // Upgrade to HD chain split if necessary - if (m_storage.CanSupportFeature(FEATURE_HD_SPLIT) && CHDChain::VERSION_HD_CHAIN_SPLIT) { + if (m_storage.CanSupportFeature(FEATURE_HD_SPLIT)) { WalletLogPrintf("Upgrading wallet to use HD chain split\n"); m_storage.SetMinVersion(FEATURE_PRE_SPLIT_KEYPOOL); split_upgrade = FEATURE_HD_SPLIT > prev_version; |