aboutsummaryrefslogtreecommitdiff
path: root/src/primitives/transaction.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-09-25 19:11:26 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-09-25 19:19:07 +0200
commit48efbdbe986355bd2478f0fdd366b20952fbf30a (patch)
treeb4581561aa9d51763bda985063d0ce4913cef19d /src/primitives/transaction.cpp
parent486270854ec0f89e798f2baff3fe01623a274ed4 (diff)
parentaf3208bfa6967d6b35aecf0ba35d9d6bf0f8317e (diff)
downloadbitcoin-48efbdbe986355bd2478f0fdd366b20952fbf30a.tar.xz
Merge pull request #5264
af3208b Resolve issue 3166. These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts. This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa. (mruddy)
Diffstat (limited to 'src/primitives/transaction.cpp')
-rw-r--r--src/primitives/transaction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp
index 606dbea798..46d3cbbe2e 100644
--- a/src/primitives/transaction.cpp
+++ b/src/primitives/transaction.cpp
@@ -36,7 +36,7 @@ std::string CTxIn::ToString() const
if (prevout.IsNull())
str += strprintf(", coinbase %s", HexStr(scriptSig));
else
- str += strprintf(", scriptSig=%s", scriptSig.ToString().substr(0,24));
+ str += strprintf(", scriptSig=%s", HexStr(scriptSig).substr(0, 24));
if (nSequence != std::numeric_limits<unsigned int>::max())
str += strprintf(", nSequence=%u", nSequence);
str += ")";
@@ -56,7 +56,7 @@ uint256 CTxOut::GetHash() const
std::string CTxOut::ToString() const
{
- return strprintf("CTxOut(nValue=%d.%08d, scriptPubKey=%s)", nValue / COIN, nValue % COIN, scriptPubKey.ToString().substr(0,30));
+ return strprintf("CTxOut(nValue=%d.%08d, scriptPubKey=%s)", nValue / COIN, nValue % COIN, HexStr(scriptPubKey).substr(0, 30));
}
CMutableTransaction::CMutableTransaction() : nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {}