Changeset View
Changeset View
Standalone View
Standalone View
src/core_write.cpp
| Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | while (pc < script.end()) { | ||||
| if (!script.GetOp(pc, opcode, vch)) { | if (!script.GetOp(pc, opcode, vch)) { | ||||
| str += "[error]"; | str += "[error]"; | ||||
| return str; | return str; | ||||
| } | } | ||||
| if (0 <= opcode && opcode <= OP_PUSHDATA4) { | if (0 <= opcode && opcode <= OP_PUSHDATA4) { | ||||
| if (vch.size() <= static_cast<std::vector<uint8_t>::size_type>(4)) { | if (vch.size() <= static_cast<std::vector<uint8_t>::size_type>(4)) { | ||||
| str += strprintf( | str += strprintf( | ||||
| "%d", | "%d", CScriptNum(vch, false, MAX_SCRIPTNUM_BYTE_SIZE_31_BIT) | ||||
| CScriptNum(vch, false, MAX_SCRIPTNUM_BYTE_SIZE).getint()); | .getint()); | ||||
| } else { | } else { | ||||
| // the IsUnspendable check makes sure not to try to decode | // the IsUnspendable check makes sure not to try to decode | ||||
| // OP_RETURN data that may match the format of a signature | // OP_RETURN data that may match the format of a signature | ||||
| if (fAttemptSighashDecode && !script.IsUnspendable()) { | if (fAttemptSighashDecode && !script.IsUnspendable()) { | ||||
| std::string strSigHashDecode; | std::string strSigHashDecode; | ||||
| // goal: only attempt to decode a defined sighash type from | // goal: only attempt to decode a defined sighash type from | ||||
| // data that looks like a signature within a scriptSig. This | // data that looks like a signature within a scriptSig. This | ||||
| // won't decode correctly formatted public keys in Pubkey or | // won't decode correctly formatted public keys in Pubkey or | ||||
| ▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines | |||||