Skip to content

Commit b085273

Browse files
committed
Add more tests for tokens in the wallet
1 parent 0c94c1e commit b085273

File tree

3 files changed

+673
-11
lines changed

3 files changed

+673
-11
lines changed

wallet/src/account/output_cache/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ impl OutputCache {
336336
}
337337

338338
pub fn add_tx(&mut self, tx_id: OutPointSourceId, tx: WalletTx) -> WalletResult<()> {
339-
let already_present = self.txs.contains_key(&tx_id);
339+
let already_present = self.txs.get(&tx_id).map_or(false, |tx| !tx.state().is_abandoned());
340340
let is_unconfirmed = match tx.state() {
341341
TxState::Inactive(_)
342342
| TxState::InMempool(_)

0 commit comments

Comments
 (0)