TransactionInput: Print sequence number in toString().

This commit is contained in:
Andreas Schildbach 2016-03-23 14:04:58 +01:00
parent 5aa4b66c7e
commit 0ebdd5bbea
2 changed files with 7 additions and 5 deletions

View File

@ -664,10 +664,11 @@ public class Transaction extends ChildMessage {
s.append(Utils.HEX.encode(scriptPubKey.getPubKeyHash()));
}
}
String flags = Joiner.on(", ").skipNulls().join(in.hasSequence() ? "has sequence" : null,
in.isOptInFullRBF() ? "opts into full RBF" : null);
if (!flags.isEmpty())
s.append("\n (").append(flags).append(')');
if (in.hasSequence()) {
s.append("\n sequence:").append(Long.toHexString(in.getSequenceNumber()));
if (in.isOptInFullRBF())
s.append(", opts into full RBF");
}
} catch (Exception e) {
s.append("[exception: ").append(e.getMessage()).append("]");
}

View File

@ -479,7 +479,8 @@ public class TransactionInput extends ChildMessage {
s.append(": COINBASE");
} else {
s.append(" for [").append(outpoint).append("]: ").append(getScriptSig());
String flags = Joiner.on(", ").skipNulls().join(hasSequence() ? "has sequence" : null,
String flags = Joiner.on(", ").skipNulls().join(
hasSequence() ? "sequence: " + Long.toHexString(sequence) : null,
isOptInFullRBF() ? "opts into full RBF" : null);
if (!flags.isEmpty())
s.append(" (").append(flags).append(')');