Changeset View
Changeset View
Standalone View
Standalone View
src/core_write.cpp
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | while (pc < script.end()) { | ||||
// won't decode correctly formatted public keys in Pubkey or | // won't decode correctly formatted public keys in Pubkey or | ||||
// Multisig scripts due to the restrictions on the pubkey | // Multisig scripts due to the restrictions on the pubkey | ||||
// formats (see IsCompressedOrUncompressedPubKey) being | // formats (see IsCompressedOrUncompressedPubKey) being | ||||
// incongruous with the checks in | // incongruous with the checks in | ||||
// CheckTransactionSignatureEncoding. | // CheckTransactionSignatureEncoding. | ||||
uint32_t flags = SCRIPT_VERIFY_STRICTENC; | uint32_t flags = SCRIPT_VERIFY_STRICTENC; | ||||
if (vch.back() & SIGHASH_FORKID) { | if (vch.back() & SIGHASH_FORKID) { | ||||
// If the transaction is using SIGHASH_FORKID, we need | // If the transaction is using SIGHASH_FORKID, we need | ||||
// to set the apropriate flag. | // to set the appropriate flag. | ||||
// TODO: Remove after the Hard Fork. | // TODO: Remove after the Hard Fork. | ||||
flags |= SCRIPT_ENABLE_SIGHASH_FORKID; | flags |= SCRIPT_ENABLE_SIGHASH_FORKID; | ||||
} | } | ||||
if (CheckTransactionSignatureEncoding(vch, flags, | if (CheckTransactionSignatureEncoding(vch, flags, | ||||
nullptr)) { | nullptr)) { | ||||
const uint8_t chSigHashType = vch.back(); | const uint8_t chSigHashType = vch.back(); | ||||
if (mapSigHashTypes.count(chSigHashType)) { | if (mapSigHashTypes.count(chSigHashType)) { | ||||
strSigHashDecode = | strSigHashDecode = | ||||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |