Skip to content

Commit 0056095

Browse files
committed
Show short scriptPubKeys correctly
Previously bitcoin-qt's -debug transaction info was showing CTxOut([error]) It is valid for a scriptPubKey to be any size, for example simply OP_RETURN is valid and can be used to destroy a TXOUT to mining fees.
1 parent 22de68d commit 0056095

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/core.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ uint256 CTxOut::GetHash() const
6363

6464
std::string CTxOut::ToString() const
6565
{
66-
if (scriptPubKey.size() < 6)
67-
return "CTxOut(error)";
6866
return strprintf("CTxOut(nValue=%"PRI64d".%08"PRI64d", scriptPubKey=%s)", nValue / COIN, nValue % COIN, scriptPubKey.ToString().substr(0,30).c_str());
6967
}
7068

0 commit comments

Comments
 (0)