Log the correct error (#10399)

This commit is contained in:
Mariano Sorgente 2022-02-24 23:57:28 -05:00 committed by GitHub
parent a98d02d943
commit b349c817fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -271,6 +271,10 @@ class PoolWallet:
spent_coin_name: bytes32 = tip_coin.name()
if spent_coin_name != new_state.coin.name():
history: List[Tuple[uint32, CoinSpend]] = await self.get_spend_history()
if new_state.coin.name() in [sp.coin.name() for _, sp in history]:
self.log.info(f"Already have state transition: {new_state.coin.name()}")
else:
self.log.warning(
f"Failed to apply state transition. tip: {tip_coin} new_state: {new_state} height {block_height}"
)