Commit c01cb2c4 authored by Andreas Schildbach's avatar Andreas Schildbach

Wallet.setTransactionBroadcaster(): Error message for precondition.

parent 483eda4c
......@@ -5068,7 +5068,8 @@ public class Wallet extends BaseTaggableObject
// Don't hold the wallet lock whilst doing this, so if the broadcaster accesses the wallet at some point there
// is no inversion.
for (Transaction tx : toBroadcast) {
checkState(tx.getConfidence().getConfidenceType() == ConfidenceType.PENDING);
ConfidenceType confidenceType = tx.getConfidence().getConfidenceType();
checkState(confidenceType == ConfidenceType.PENDING, "Expected PENDING, 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.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment