Skip to content

Commit 8dadf4b

Browse files
committed
Post-syncer/chain refactor, directly close peer
1 parent 267af33 commit 8dadf4b

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

p2p/lightchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ async def _retry_on_bad_response(self, make_request_to_peer: Callable[[LESPeer],
267267
return await make_request_to_peer(peer)
268268
except BadLESResponse as exc:
269269
self.logger.warn("Disconnecting from peer, because: %s", exc)
270-
await self.disconnect_peer(peer, DisconnectReason.subprotocol_error)
270+
await peer.disconnect(DisconnectReason.subprotocol_error)
271271
# reattempt after removing this peer from our pool
272272

273273
raise TimeoutError("Could not complete peer request in %d attempts" % MAX_REQUEST_ATTEMPTS)

p2p/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Callable,
99
List,
1010
Optional,
11-
TypeVar
11+
TypeVar,
1212
cast,
1313
)
1414

tests/p2p/test_lightchain_integration.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from eth_hash.auto import keccak
1212

1313
from evm.chains.ropsten import (
14-
RopstenChain,
1514
ROPSTEN_NETWORK_ID,
1615
ROPSTEN_GENESIS_HEADER,
1716
ROPSTEN_VM_CONFIGURATION,

0 commit comments

Comments
 (0)