Transaction.toString(): Print incomplete transactions, too.
@@ -658,10 +658,6 @@ public class Transaction extends ChildMessage {
if (isOptInFullRBF()) {
s.append(" opts into full replace-by-fee\n");
}
- if (inputs.size() == 0) {
- s.append(" INCOMPLETE: No inputs!\n");
- return s.toString();
- }
if (isCoinBase()) {
String script;
String script2;
@@ -676,6 +672,7 @@ public class Transaction extends ChildMessage {
.append(") (scriptPubKey ").append(script2).append(")\n");
return s.toString();
}
+ if (!inputs.isEmpty()) {
for (TransactionInput in : inputs) {
s.append(" ");
s.append("in ");
@@ -707,6 +704,10 @@ public class Transaction extends ChildMessage {
}
s.append('\n');
}
+ } else {
+ s.append(" ");
+ s.append("INCOMPLETE: No inputs!\n");
+ }
for (TransactionOutput out : outputs) {
s.append(" ");
s.append("out ");
