mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 14:54:15 +00:00
Transaction.toString(): Don't try printing hash160 for non-address type outputs
This commit is contained in:
parent
ab0b6d75fa
commit
ef6240a8f8
@ -674,8 +674,11 @@ public class Transaction extends ChildMessage implements Serializable {
|
||||
s.append(outpoint.toString());
|
||||
final TransactionOutput connectedOutput = outpoint.getConnectedOutput();
|
||||
if (connectedOutput != null) {
|
||||
Script scriptPubKey = connectedOutput.getScriptPubKey();
|
||||
if (scriptPubKey.isSentToAddress() || scriptPubKey.isPayToScriptHash()) {
|
||||
s.append(" hash160:");
|
||||
s.append(Utils.HEX.encode(connectedOutput.getScriptPubKey().getPubKeyHash()));
|
||||
s.append(Utils.HEX.encode(scriptPubKey.getPubKeyHash()));
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
s.append("[exception: ").append(e.getMessage()).append("]");
|
||||
|
Loading…
Reference in New Issue
Block a user