Wallet: add transaction ID to a precondition message

This commit is contained in:
Andreas Schildbach 2022-08-12 01:05:58 +02:00
parent 410b127176
commit 64c619d2bf

View file

@ -5234,7 +5234,7 @@ public class Wallet extends BaseTaggableObject
for (Transaction tx : toBroadcast) {
ConfidenceType confidenceType = tx.getConfidence().getConfidenceType();
checkState(confidenceType == ConfidenceType.PENDING || confidenceType == ConfidenceType.IN_CONFLICT,
"Expected PENDING or IN_CONFLICT, was %s.", confidenceType);
"Tx %s: expected PENDING or IN_CONFLICT, was %s", tx.getTxId(), confidenceType);
// Re-broadcast even if it's marked as already seen for two reasons
// 1) Old wallets may have transactions marked as broadcast by 1 peer when in reality the network
// never saw it, due to bugs.