mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-13 11:36:15 +01:00
Merge 9b28fdbfa0
into 40b1ac351f
This commit is contained in:
commit
fce493d36e
2 changed files with 10 additions and 4 deletions
|
@ -769,7 +769,6 @@ public class Transaction extends BaseMessage {
|
|||
if (isCoinBase()) {
|
||||
s.append(indent).append("coinbase\n");
|
||||
} else if (!inputs.isEmpty()) {
|
||||
int i = 0;
|
||||
for (TransactionInput in : inputs) {
|
||||
s.append(indent).append(" ");
|
||||
s.append("in ");
|
||||
|
@ -811,9 +810,16 @@ public class Transaction extends BaseMessage {
|
|||
s.append('\n');
|
||||
}
|
||||
} catch (Exception e) {
|
||||
s.append("[exception: ").append(e.getMessage()).append("]\n");
|
||||
s.append(ByteUtils.formatHex(getInput(0).getScriptBytes()));
|
||||
if (!isCoinBase()) {
|
||||
final Coin value = in.getValue();
|
||||
if (value != null)
|
||||
s.append(" ").append(value.toFriendlyString());
|
||||
s.append('\n');
|
||||
s.append(indent).append(" exception: ").append(e.getMessage());
|
||||
}
|
||||
s.append('\n');
|
||||
}
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
s.append(indent).append(" ");
|
||||
|
|
|
@ -515,7 +515,7 @@ public class TransactionTest {
|
|||
};
|
||||
|
||||
tx.addInput(ti);
|
||||
assertTrue(tx.toString().contains("[exception: "));
|
||||
assertTrue(tx.toString().contains("exception: "));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Reference in a new issue