mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 05:27:17 +00:00
Wallet: always broadcast all pending txns, not only those that are unmarked.
This commit is contained in:
committed by
Andreas Schildbach
parent
f851ebc42f
commit
9d65affc42
@@ -3424,10 +3424,12 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||
// Now use it to upload any pending transactions we have that are marked as not being seen by any peers yet.
|
||||
for (Transaction tx : pending.values()) {
|
||||
checkState(tx.getConfidence().getConfidenceType() == ConfidenceType.PENDING);
|
||||
if (tx.getConfidence().numBroadcastPeers() == 0) {
|
||||
log.info("New broadcaster so uploading waiting tx {}", tx.getHash());
|
||||
broadcaster.broadcastTransaction(tx);
|
||||
}
|
||||
// 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.
|
||||
// 2) It can't really hurt.
|
||||
log.info("New broadcaster so uploading waiting tx {}", tx.getHash());
|
||||
broadcaster.broadcastTransaction(tx);
|
||||
}
|
||||
} finally {
|
||||
lock.unlock();
|
||||
|
||||
Reference in New Issue
Block a user