Skip to content

Commit 9c1ec68

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#22102: Remove Warning: from warning message printed for unknown new rules
6d7e46c Remove `Warning:` (Prayank) Pull request description: Reason: I noticed that `Warning` is printed 2 times in `-getinfo` while reviewing bitcoin/bitcoin#21832 (comment) Same string is used for GUI, log and stderr. If we need to add `Warning:` in GUI or other place we can always prepend to this string. CLI: ``` Warnings: Unknown new rules activated (versionbit 28) ``` GUI: ![image](https://user-images.githubusercontent.com/13405205/120110401-e36ab180-c18a-11eb-8031-4d52287dc263.png) ACKs for top commit: MarcoFalke: review ACK 6d7e46c Tree-SHA512: 25760cf6d850f6c2216d651fa46574d2d21a9d58f4577ecb58f9566ea8cd07bfcd6679bb8a1f53575e441b02d295306f492c0c99a48c909e60e5d977ec1861f6
2 parents b0e5fbf + 6d7e46c commit 9c1ec68

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2251,7 +2251,7 @@ static void UpdateTip(CTxMemPool& mempool, const CBlockIndex* pindexNew, const C
22512251
WarningBitsConditionChecker checker(bit);
22522252
ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]);
22532253
if (state == ThresholdState::ACTIVE || state == ThresholdState::LOCKED_IN) {
2254-
const bilingual_str warning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit);
2254+
const bilingual_str warning = strprintf(_("Unknown new rules activated (versionbit %i)"), bit);
22552255
if (state == ThresholdState::ACTIVE) {
22562256
DoWarning(warning);
22572257
} else {

test/functional/feature_versionbits_warning.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
VB_UNKNOWN_BIT = 27 # Choose a bit unassigned to any deployment
2222
VB_UNKNOWN_VERSION = VB_TOP_BITS | (1 << VB_UNKNOWN_BIT)
2323

24-
WARN_UNKNOWN_RULES_ACTIVE = "unknown new rules activated (versionbit {})".format(VB_UNKNOWN_BIT)
25-
VB_PATTERN = re.compile("Warning: unknown new rules activated.*versionbit")
24+
WARN_UNKNOWN_RULES_ACTIVE = "Unknown new rules activated (versionbit {})".format(VB_UNKNOWN_BIT)
25+
VB_PATTERN = re.compile("Unknown new rules activated.*versionbit")
2626

2727
class VersionBitsWarningTest(BitcoinTestFramework):
2828
def set_test_params(self):

0 commit comments

Comments
 (0)