Skip to content

Commit ca1a378

Browse files
committed
Fix comments
1 parent f87218f commit ca1a378

File tree

3 files changed

+767
-204
lines changed

3 files changed

+767
-204
lines changed

wallet/src/account/mod.rs

+5-11
Original file line numberDiff line numberDiff line change
@@ -1860,16 +1860,10 @@ impl<K: AccountKeyChains> Account<K> {
18601860
.txs_with_unconfirmed()
18611861
.iter()
18621862
.filter_map(|(id, tx)| match tx.state() {
1863-
TxState::Confirmed(height, _, idx) => {
1864-
if height > common_block_height {
1865-
Some((
1866-
AccountWalletTxId::new(self.get_account_id(), id.clone()),
1867-
(height, idx),
1868-
))
1869-
} else {
1870-
None
1871-
}
1872-
}
1863+
TxState::Confirmed(height, _, idx) => (height > common_block_height).then_some((
1864+
AccountWalletTxId::new(self.get_account_id(), id.clone()),
1865+
(height, idx),
1866+
)),
18731867
TxState::Inactive(_)
18741868
| TxState::Conflicted(_)
18751869
| TxState::InMempool(_)
@@ -1883,7 +1877,7 @@ impl<K: AccountKeyChains> Account<K> {
18831877
for (tx_id, _) in revoked_txs {
18841878
db_tx.del_transaction(&tx_id)?;
18851879
let source = tx_id.into_item_id();
1886-
self.output_cache.remove_tx(&source)?;
1880+
self.output_cache.remove_confirmed_tx(&source)?;
18871881
wallet_events.del_transaction(self.account_index(), source);
18881882
}
18891883

0 commit comments

Comments
 (0)