mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 81a19e7253 into merged_master (Bitcoin PR #19852)
This commit is contained in:
commit
ecf4d0de5c
1 changed files with 3 additions and 2 deletions
|
|
@ -139,8 +139,9 @@ std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDeco
|
|||
// checks in CheckSignatureEncoding.
|
||||
if (CheckSignatureEncoding(vch, SCRIPT_VERIFY_STRICTENC, nullptr)) {
|
||||
const unsigned char chSigHashType = vch.back();
|
||||
if (mapSigHashTypes.count(chSigHashType)) {
|
||||
strSigHashDecode = "[" + mapSigHashTypes.find(chSigHashType)->second + "]";
|
||||
const auto it = mapSigHashTypes.find(chSigHashType);
|
||||
if (it != mapSigHashTypes.end()) {
|
||||
strSigHashDecode = "[" + it->second + "]";
|
||||
vch.pop_back(); // remove the sighash type byte. it will be replaced by the decode.
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue