Skip to content

Commit 916822b

Browse files
committed
rebase cleanup
1 parent 93745e8 commit 916822b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

p2p/peer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,16 +1063,16 @@ async def request_stuff() -> None:
10631063
peer_pool.logger.info("Waiting for peer connection...")
10641064
await asyncio.sleep(0.2)
10651065
peer = peer_pool.highest_td_peer
1066-
headers = await peer.requests.get_block_headers(2440319, max_headers=100)
1067-
hashes = [header.hash for header in headers]
1066+
headers = await cast(ETHPeer, peer).requests.get_block_headers(2440319, max_headers=100)
1067+
hashes = tuple(header.hash for header in headers)
10681068
if peer_class == ETHPeer:
10691069
peer = cast(ETHPeer, peer)
10701070
peer.sub_proto._send_get_block_bodies(hashes)
10711071
peer.sub_proto._send_get_receipts(hashes)
10721072
else:
10731073
peer = cast(LESPeer, peer)
10741074
request_id = 1
1075-
peer.sub_proto.send_get_block_bodies(hashes, request_id + 1)
1075+
peer.sub_proto.send_get_block_bodies(list(hashes), request_id + 1)
10761076
peer.sub_proto.send_get_receipts(hashes[0], request_id + 2)
10771077

10781078
sigint_received = asyncio.Event()

trinity/protocol/eth/managers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
)
77

88
from cytoolz import (
9-
concat,
109
compose,
1110
)
1211

@@ -178,7 +177,7 @@ async def _normalize_response(self,
178177
return receipt_bundles
179178

180179
def _get_item_count(self, msg: ReceiptsByBlock) -> int:
181-
return len(concat(msg))
180+
return sum(len(item) for item in msg)
182181

183182

184183
# (BlockBody, (txn_root, txn_trie_data), uncles_hash)

trinity/protocol/eth/proto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def send_handshake(self, head_info: 'ChainInfo') -> None:
7373
#
7474
# Node Data
7575
#
76-
def send_get_node_data(self, request: Union[NodeDataRequest, Tuple[Hash32, ...]]) -> None:
76+
def send_get_node_data(self, request: NodeDataRequest) -> None:
7777
self._send_get_node_data(request.node_hashes)
7878

7979
def _send_get_node_data(self, node_hashes: Tuple[Hash32, ...]) -> None:

0 commit comments

Comments
 (0)