Skip to content

Commit d02be80

Browse files
fanquakevijaydasmp
authored andcommitted
Merge bitcoin#28291: rpc: removed StrFormatInternalBug quote delimitation
6e8f646 removed StrFormatInternalBug quote delimitation (Reese Russell) Pull request description: This PR rectifies an unnecessary set of quotes delimiting the contents of ```StrFormatInternalBug```. This is a follow up to MarcoFalke bitcoin#28123 (comment). The method of action was to remove the escaped quotes that were a part of strprintf. A single functional test case was modified to reflect the new output format. ```STR_INTERNAL_BUG``` was applied to bitcoin#28123 in ```std::string RPCArg::ToString(const bool oneline)``` in ```rpc/util.cpp``` The results can be seen below. Previously ![image](https://github.com/bitcoin/bitcoin/assets/3104223/53f9ea59-317f-4c62-9fc1-04255eeb4641) This PR ![image](https://github.com/bitcoin/bitcoin/assets/3104223/5c6a3110-f1f3-4b3c-8e8a-9c8f1c3176e7) Additional context can be found here. bitcoin#28123 (comment) Thank you. ACKs for top commit: MarcoFalke: review ACK 6e8f646 stickies-v: ACK 6e8f646 Tree-SHA512: 35317e31a527630495b566407e37db9941dab7f81cfaeb1ea3309683c48e4273284645ad615f73e646a137b4f2ae35933603e9182a7dbdd22cac98d038c491dc
1 parent fbc28d0 commit d02be80

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/util/check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
std::string StrFormatInternalBug(const char* msg, const char* file, int line, const char* func)
1818
{
19-
return strprintf("Internal bug detected: \"%s\"\n%s:%d (%s)\n"
19+
return strprintf("Internal bug detected: %s\n%s:%d (%s)\n"
2020
"%s %s\n"
2121
"Please report this issue here: %s\n",
2222
msg, file, line, func, PACKAGE_NAME, FormatFullVersion(), PACKAGE_BUGREPORT);

test/functional/rpc_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def run_test(self):
2727
self.log.info("test CHECK_NONFATAL")
2828
assert_raises_rpc_error(
2929
-1,
30-
'Internal bug detected: "request.params[9].get_str() != "trigger_internal_bug""',
30+
'Internal bug detected: request.params[9].get_str() != "trigger_internal_bug"',
3131
lambda: node.echo(arg9='trigger_internal_bug'),
3232
)
3333

0 commit comments

Comments
 (0)