mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 21:47:18 +00:00
Wallet.setTransactionBroadcaster(): Error message for precondition.
This commit is contained in:
@@ -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
|
// Don't hold the wallet lock whilst doing this, so if the broadcaster accesses the wallet at some point there
|
||||||
// is no inversion.
|
// is no inversion.
|
||||||
for (Transaction tx : toBroadcast) {
|
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
|
// 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
|
// 1) Old wallets may have transactions marked as broadcast by 1 peer when in reality the network
|
||||||
// never saw it, due to bugs.
|
// never saw it, due to bugs.
|
||||||
|
|||||||
Reference in New Issue
Block a user