mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge pull request #5499
7f71813 Bugfix: prioritisetransaction: Do some basic sanity checking on txid (Luke Dashjr)
This commit is contained in:
commit
a5eb61d9ef
3 changed files with 7 additions and 2 deletions
|
|
@ -131,6 +131,11 @@ uint256 ParseHashUV(const UniValue& v, const string& strName)
|
|||
string strHex;
|
||||
if (v.isStr())
|
||||
strHex = v.getValStr();
|
||||
return ParseHashStr(strHex, strName); // Note: ParseHashStr("") throws a runtime_error
|
||||
}
|
||||
|
||||
uint256 ParseHashStr(const std::string& strHex, const std::string& strName)
|
||||
{
|
||||
if (!IsHex(strHex)) // Note: IsHex("") is false
|
||||
throw runtime_error(strName+" must be hexadecimal string (not '"+strHex+"')");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue