From f416dec2eabb5941c6f7f4790cc4ef45fafd05f7 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Wed, 8 Jun 2016 14:23:27 +0200 Subject: [PATCH] Wallet: Fix precondition for transaction confidence of transactions in the pending pool. They can now also be IN_CONFLICT. --- core/src/main/java/org/bitcoinj/wallet/Wallet.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/bitcoinj/wallet/Wallet.java b/core/src/main/java/org/bitcoinj/wallet/Wallet.java index 86321501..d2196602 100644 --- a/core/src/main/java/org/bitcoinj/wallet/Wallet.java +++ b/core/src/main/java/org/bitcoinj/wallet/Wallet.java @@ -5069,7 +5069,8 @@ public class Wallet extends BaseTaggableObject // is no inversion. for (Transaction tx : toBroadcast) { ConfidenceType confidenceType = tx.getConfidence().getConfidenceType(); - checkState(confidenceType == ConfidenceType.PENDING, "Expected PENDING, was %s.", confidenceType); + checkState(confidenceType == ConfidenceType.PENDING || confidenceType == ConfidenceType.IN_CONFLICT, + "Expected PENDING or IN_CONFLICT, was %s.", 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.