mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-30 19:41:24 +00:00
Transaction: In toString(), if a script type is unknown just say so.
This commit is contained in:
@@ -808,9 +808,10 @@ public class Transaction extends ChildMessage {
|
|||||||
ScriptType scriptType = scriptPubKey.getScriptType();
|
ScriptType scriptType = scriptPubKey.getScriptType();
|
||||||
s.append(indent).append(" ");
|
s.append(indent).append(" ");
|
||||||
if (scriptType != null)
|
if (scriptType != null)
|
||||||
s.append(scriptType).append(" addr:").append(scriptPubKey.getToAddress(params))
|
s.append(scriptType).append(" addr:").append(scriptPubKey.getToAddress(params));
|
||||||
.append(" ");
|
else
|
||||||
s.append("outpoint:").append(outpoint).append('\n');
|
s.append("unknown script type");
|
||||||
|
s.append(" outpoint:").append(outpoint).append('\n');
|
||||||
}
|
}
|
||||||
if (in.hasSequence()) {
|
if (in.hasSequence()) {
|
||||||
s.append(indent).append(" sequence:").append(Long.toHexString(in.getSequenceNumber()));
|
s.append(indent).append(" sequence:").append(Long.toHexString(in.getSequenceNumber()));
|
||||||
@@ -838,9 +839,12 @@ public class Transaction extends ChildMessage {
|
|||||||
s.append(" ");
|
s.append(" ");
|
||||||
s.append(out.getValue().toFriendlyString());
|
s.append(out.getValue().toFriendlyString());
|
||||||
s.append('\n');
|
s.append('\n');
|
||||||
|
s.append(indent).append(" ");
|
||||||
ScriptType scriptType = scriptPubKey.getScriptType();
|
ScriptType scriptType = scriptPubKey.getScriptType();
|
||||||
if (scriptType != null)
|
if (scriptType != null)
|
||||||
s.append(indent).append(" " + scriptType + " addr:" + scriptPubKey.getToAddress(params));
|
s.append(scriptType).append(" addr:").append(scriptPubKey.getToAddress(params));
|
||||||
|
else
|
||||||
|
s.append("unknown script type");
|
||||||
if (!out.isAvailableForSpending()) {
|
if (!out.isAvailableForSpending()) {
|
||||||
s.append(" spent");
|
s.append(" spent");
|
||||||
final TransactionInput spentBy = out.getSpentBy();
|
final TransactionInput spentBy = out.getSpentBy();
|
||||||
|
Reference in New Issue
Block a user