mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-13 10:57:56 +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 {
|
try {
|
||||||
Script scriptSig = in.getScriptSig();
|
Script scriptSig = in.getScriptSig();
|
||||||
s.append(scriptSig);
|
s.append(scriptSig);
|
||||||
s.append(" / ");
|
s.append("\n ");
|
||||||
s.append(in.getOutpoint().toString());
|
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) {
|
} catch (Exception e) {
|
||||||
s.append("[exception: ").append(e.getMessage()).append("]");
|
s.append("[exception: ").append(e.getMessage()).append("]");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user