From fff3ca44c43894cf84e5c4167d9e3f9cee468b18 Mon Sep 17 00:00:00 2001 From: dustinface <35775977+xdustinface@users.noreply.github.com> Date: Thu, 16 Mar 2023 23:42:55 +0700 Subject: [PATCH] wallet: Handle trade coins in the `try` block of `new_coin_state` (#14833) --- chia/wallet/wallet_state_manager.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/chia/wallet/wallet_state_manager.py b/chia/wallet/wallet_state_manager.py index 89f47cf273fb3..d8805fdaedb8f 100644 --- a/chia/wallet/wallet_state_manager.py +++ b/chia/wallet/wallet_state_manager.py @@ -1030,7 +1030,6 @@ class WalletStateManager: trade_removals = await self.trade_manager.get_coins_of_interest() all_unconfirmed: List[TransactionRecord] = await self.tx_store.get_all_unconfirmed() - trade_coin_removed: List[CoinState] = [] used_up_to = -1 ph_to_index_cache: LRUCache = LRUCache(100) @@ -1066,7 +1065,7 @@ class WalletStateManager: continue if coin_state.spent_height is not None and coin_name in trade_removals: - trade_coin_removed.append(coin_state) + await self.trade_manager.coins_of_interest_farmed(coin_state, fork_height, peer) wallet_id: Optional[uint32] = None wallet_type: Optional[WalletType] = None if wallet_info is not None: @@ -1400,8 +1399,6 @@ class WalletStateManager: else: await self.retry_store.remove_state(coin_state) continue - for coin_state_removed in trade_coin_removed: - await self.trade_manager.coins_of_interest_farmed(coin_state_removed, fork_height, peer) async def have_a_pool_wallet_with_launched_id(self, launcher_id: bytes32) -> bool: for wallet_id, wallet in self.wallets.items():