mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-08-01 12:31:23 +00:00
In Transaction.toString(): For outpoints, show the pubkey-hash of the connected output (if available). This makes it easier to debug wallets.
This commit is contained in:
@@ -614,8 +614,15 @@ public class Transaction extends ChildMessage implements Serializable {
|
||||
try {
|
||||
Script scriptSig = in.getScriptSig();
|
||||
s.append(scriptSig);
|
||||
s.append(" / ");
|
||||
s.append(in.getOutpoint().toString());
|
||||
s.append("\n ");
|
||||
s.append("outpoint:");
|
||||
final TransactionOutPoint outpoint = in.getOutpoint();
|
||||
s.append(outpoint.toString());
|
||||
final TransactionOutput connectedOutput = outpoint.getConnectedOutput();
|
||||
if (connectedOutput != null) {
|
||||
s.append(" hash160:");
|
||||
s.append(Utils.bytesToHexString(connectedOutput.getScriptPubKey().getPubKeyHash()));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
s.append("[exception: ").append(e.getMessage()).append("]");
|
||||
}
|
||||
|
Reference in New Issue
Block a user