Skip to content

Commit

Permalink
await peer.close() in WalletNode.validate_received_state_from_peer() (C…
Browse files Browse the repository at this point in the history
…hia-Network#10054)

```
farm/chia-blockchain/chia/wallet/wallet_node.py:1058: RuntimeWarning: coroutine 'WSChiaConnection.close' was never awaited
peer.close(9999)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
```
  • Loading branch information
altendky authored Feb 1, 2022
1 parent c893c44 commit 29fad42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chia/wallet/wallet_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ async def validate_received_state_from_peer(
)

if validate_additions_result is False:
peer.close(9999)
await peer.close(9999)
return False

# get blocks on top of this block
Expand Down Expand Up @@ -1085,7 +1085,7 @@ async def validate_received_state_from_peer(
spent_state_block.foliage_transaction_block.removals_root,
)
if validate_removals_result is False:
peer.close(9999)
await peer.close(9999)
return False
validated = await self.validate_block_inclusion(spent_state_block, peer, peer_request_cache)
if not validated:
Expand All @@ -1110,7 +1110,7 @@ async def validate_received_state_from_peer(
spent_state_block.foliage_transaction_block.removals_root,
)
if validate_removals_result is False:
peer.close(9999)
await peer.close(9999)
return False
validated = await self.validate_block_inclusion(spent_state_block, peer, peer_request_cache)
if not validated:
Expand Down

0 comments on commit 29fad42

Please sign in to comment.