mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 14:50:57 +01:00
Transaction: In toString() print outputs of coinbase.
This commit is contained in:
parent
0b7bdff6de
commit
8018cb2786
1 changed files with 2 additions and 14 deletions
|
@ -833,20 +833,8 @@ public class Transaction extends ChildMessage {
|
|||
if (purpose != null)
|
||||
s.append(indent).append("purpose: ").append(purpose).append('\n');
|
||||
if (isCoinBase()) {
|
||||
String script;
|
||||
String script2;
|
||||
try {
|
||||
script = inputs.get(0).getScriptSig().toString();
|
||||
script2 = outputs.get(0).getScriptPubKey().toString();
|
||||
} catch (ScriptException e) {
|
||||
script = "???";
|
||||
script2 = "???";
|
||||
}
|
||||
s.append(indent).append(" == COINBASE TXN (scriptSig ").append(script).append(") (scriptPubKey ").append(script2)
|
||||
.append(")\n");
|
||||
return s.toString();
|
||||
}
|
||||
if (!inputs.isEmpty()) {
|
||||
s.append(indent).append("coinbase\n");
|
||||
} else if (!inputs.isEmpty()) {
|
||||
int i = 0;
|
||||
for (TransactionInput in : inputs) {
|
||||
s.append(indent).append(" ");
|
||||
|
|
Loading…
Add table
Reference in a new issue