From 9651b94e50ff6d494376efc9b7032c3d1bc84c12 Mon Sep 17 00:00:00 2001 From: drew2a Date: Tue, 24 Jan 2023 16:39:06 +0700 Subject: [PATCH 1/3] Update `ipv8` to the version `2.10` --- requirements-core.txt | 2 +- requirements-test.txt | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/requirements-core.txt b/requirements-core.txt index 791d70d4939..48fc84087d7 100644 --- a/requirements-core.txt +++ b/requirements-core.txt @@ -22,7 +22,7 @@ service-identity==21.1.0 yappi==1.4.0 yarl==1.7.2 # keep this dependency higher than 1.6.3. See: https://github.com/aio-libs/yarl/issues/517 bitarray==2.5.1 -pyipv8==2.8.0 +pyipv8==2.10.0 libtorrent==1.2.15 file-read-backwards==2.0.0 Brotli==1.0.9 # to prevent AttributeError on macOs: module 'brotli' has no attribute 'error' (in urllib3.response) diff --git a/requirements-test.txt b/requirements-test.txt index 70590ae4a5d..3b0bd8d7ddc 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -15,6 +15,4 @@ freezegun==1.2.1 coverage==6.3.2 looptime==0.2 -asynctest==0.13.0 # this library has to be installed to properly work with ipv8 TestBase. - scipy==1.10.0 From 93c148598469fbabcde778e245c8729b47396133 Mon Sep 17 00:00:00 2001 From: drew2a Date: Tue, 24 Jan 2023 20:29:34 +0700 Subject: [PATCH 2/3] Fix `on_balance_request_cell` --- .../core/components/tunnel/community/tunnel_community.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tribler/core/components/tunnel/community/tunnel_community.py b/src/tribler/core/components/tunnel/community/tunnel_community.py index 32a679bbe1f..16d350923fc 100644 --- a/src/tribler/core/components/tunnel/community/tunnel_community.py +++ b/src/tribler/core/components/tunnel/community/tunnel_community.py @@ -243,12 +243,12 @@ def should_join_circuit(self, create_payload, previous_node_address): return balance_future @unpack_cell(BalanceRequestPayload) - def on_balance_request_cell(self, source_address, payload, _): + def on_balance_request_cell(self, _, payload, __): if self.request_cache.has("create", payload.identifier): request = self.request_cache.get("create", payload.identifier) forwarding_relay = RelayRoute(request.from_circuit_id, request.peer) self.send_cell(forwarding_relay.peer, RelayBalanceRequestPayload(forwarding_relay.circuit_id)) - elif self.request_cache.has("retry", payload.identifier): + elif self.request_cache.has("retry", payload.circuit_id): self.on_balance_request(payload) else: self.logger.warning("Circuit creation cache for id %s not found!", payload.circuit_id) From 5cac6fb331b45eeec04c85e604306eece38a47ae Mon Sep 17 00:00:00 2001 From: drew2a Date: Tue, 24 Jan 2023 22:12:33 +0700 Subject: [PATCH 3/3] Fix `test_item_rank` --- src/tribler/core/tests/test_search_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tribler/core/tests/test_search_utils.py b/src/tribler/core/tests/test_search_utils.py index b1a1fe94a18..3832345fa79 100644 --- a/src/tribler/core/tests/test_search_utils.py +++ b/src/tribler/core/tests/test_search_utils.py @@ -149,7 +149,7 @@ def test_title_rank(): def test_item_rank(): item = dict(name="abc", num_seeders=10, num_leechers=20) - assert item_rank("abc", item) == pytest.approx(0.81978445) + assert item_rank("abc", item) == pytest.approx(0.819784) def test_find_word():