OSDN Git Service

Show short scriptPubKeys correctly
authormonacoinproject <monacoinproject@gmail.com>
Sun, 6 Apr 2014 14:03:10 +0000 (23:03 +0900)
committermonacoinproject <monacoinproject@gmail.com>
Sun, 6 Apr 2014 14:03:10 +0000 (23:03 +0900)
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.

Conflicts:
src/core.cpp

src/main.h

index dffcdde..8e7e9e5 100644 (file)
@@ -450,8 +450,6 @@ public:
 
     std::string ToString() const
     {
-        if (scriptPubKey.size() < 6)
-            return "CTxOut(error)";
         return strprintf("CTxOut(nValue=%"PRI64d".%08"PRI64d", scriptPubKey=%s)", nValue / COIN, nValue % COIN, scriptPubKey.ToString().substr(0,30).c_str());
     }