mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-30 23:02:15 +00:00
Remove transactions from the dead pool when they become live, and from pending when they become dead. Addresses comments from Miron.
This commit is contained in:
parent
ca84bea462
commit
675abc2974
@ -842,6 +842,7 @@ public class Wallet implements Serializable {
|
||||
TransactionOutput doubleSpent = input.getConnectedOutput(pool);
|
||||
Transaction replacement = doubleSpent.getSpentBy().parentTransaction;
|
||||
dead.put(tx.getHash(), tx);
|
||||
pending.remove(tx.getHash());
|
||||
// Inform the event listeners of the newly dead tx.
|
||||
for (WalletEventListener listener : eventListeners) {
|
||||
synchronized (listener) {
|
||||
@ -860,6 +861,7 @@ public class Wallet implements Serializable {
|
||||
// All inputs are either valid for spending or don't come from us. Miners are trying to reinclude it.
|
||||
log.info(" ->pending", tx.getHashAsString());
|
||||
pending.put(tx.getHash(), tx);
|
||||
dead.remove(tx.getHash());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user