mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-01 21:17:13 +00:00
Transaction.toString(): Clearly state if script is missing.
This commit is contained in:
@@ -27,6 +27,7 @@ import org.bitcoinj.utils.ExchangeRate;
|
|||||||
import org.bitcoinj.wallet.Wallet;
|
import org.bitcoinj.wallet.Wallet;
|
||||||
import org.bitcoinj.wallet.WalletTransaction.Pool;
|
import org.bitcoinj.wallet.WalletTransaction.Pool;
|
||||||
|
|
||||||
|
import com.google.common.base.Strings;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.google.common.primitives.Ints;
|
import com.google.common.primitives.Ints;
|
||||||
import com.google.common.primitives.Longs;
|
import com.google.common.primitives.Longs;
|
||||||
@@ -678,8 +679,8 @@ public class Transaction extends ChildMessage {
|
|||||||
s.append("in ");
|
s.append("in ");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Script scriptSig = in.getScriptSig();
|
String scriptSigStr = in.getScriptSig().toString();
|
||||||
s.append(scriptSig);
|
s.append(!Strings.isNullOrEmpty(scriptSigStr) ? scriptSigStr : "<no scriptSig>");
|
||||||
final Coin value = in.getValue();
|
final Coin value = in.getValue();
|
||||||
if (value != null)
|
if (value != null)
|
||||||
s.append(" ").append(value.toFriendlyString());
|
s.append(" ").append(value.toFriendlyString());
|
||||||
@@ -713,8 +714,8 @@ public class Transaction extends ChildMessage {
|
|||||||
s.append(" ");
|
s.append(" ");
|
||||||
s.append("out ");
|
s.append("out ");
|
||||||
try {
|
try {
|
||||||
Script scriptPubKey = out.getScriptPubKey();
|
String scriptPubKeyStr = out.getScriptPubKey().toString();
|
||||||
s.append(scriptPubKey);
|
s.append(!Strings.isNullOrEmpty(scriptPubKeyStr) ? scriptPubKeyStr : "<no scriptPubKey>");
|
||||||
s.append(" ");
|
s.append(" ");
|
||||||
s.append(out.getValue().toFriendlyString());
|
s.append(out.getValue().toFriendlyString());
|
||||||
if (!out.isAvailableForSpending()) {
|
if (!out.isAvailableForSpending()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user