diff options
author | merge-script <fanquake@gmail.com> | 2024-04-24 20:55:27 +0800 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-04-24 20:55:27 +0800 |
commit | 9e0e51b1d9f9c9bf95bc2c56f29ae32fa479c3b3 (patch) | |
tree | 7c81c4130a7cdcdb96e1399b3ba6803cc772da2c /src | |
parent | 19d59c9cc6078df7927eec3fe34a292121909041 (diff) | |
parent | fa6ab0d020d0b1492203f7eb2ccb8051812de086 (diff) |
Merge bitcoin/bitcoin#29870: rpc: Reword SighashFromStr error message
fa6ab0d020d0b1492203f7eb2ccb8051812de086 rpc: Reword SighashFromStr error message (MarcoFalke)
Pull request description:
Put quotes around the parameter. In theory, `std::quoted` should be used, but that seems overkill.
This should avoid error messages such as `A valid sighash parameter is not a valid sighash parameter. (code -8)`.
Also, it should fix fuzz false positives when searching for internal bugs in the `rpc` fuzz target. For example, `ZGVzY3JpcHRvcnByb2Nlc3Nwc2J0XP9ce1tdXOVJbnRlcm5hbCBidWcgZGV0ZWN0ZWQAXQ0AHfcAXQ1p7TJv`.
ACKs for top commit:
dergoegge:
ACK fa6ab0d020d0b1492203f7eb2ccb8051812de086
brunoerg:
utACK fa6ab0d020d0b1492203f7eb2ccb8051812de086
Tree-SHA512: e2c0cc0126de61873a863af38b7b0a23d2dadd596ca0418dae2ad091e8acfb6a9d657c376d59187bb008989dc78c6b44fe518590e5217e4049a867b220c9fb18
Diffstat (limited to 'src')
-rw-r--r-- | src/core_read.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core_read.cpp b/src/core_read.cpp index e32e46d1b9..5956d9df5f 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -256,6 +256,6 @@ util::Result<int> SighashFromStr(const std::string& sighash) if (it != map_sighash_values.end()) { return it->second; } else { - return util::Error{Untranslated(sighash + " is not a valid sighash parameter.")}; + return util::Error{Untranslated("'" + sighash + "' is not a valid sighash parameter.")}; } } |