mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 17:24:58 +02:00
Merge bitcoin/bitcoin#29870: rpc: Reword SighashFromStr error message
fa6ab0d020rpc: 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: ACKfa6ab0d020brunoerg: utACKfa6ab0d020Tree-SHA512: e2c0cc0126de61873a863af38b7b0a23d2dadd596ca0418dae2ad091e8acfb6a9d657c376d59187bb008989dc78c6b44fe518590e5217e4049a867b220c9fb18
This commit is contained in:
@@ -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.")};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user