Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVA: refactor the Transfer class #6883

Merged
merged 1 commit into from Apr 26, 2022

Conversation

drew2a
Copy link
Collaborator

@drew2a drew2a commented Apr 22, 2022

This PR addresses #6845

@drew2a drew2a mentioned this pull request Apr 22, 2022
@kozlovsky kozlovsky force-pushed the refactoring/eva_transfer branch 4 times, most recently from 002fbd2 to d18413a Compare April 26, 2022 08:34
@drew2a drew2a requested a review from kozlovsky April 26, 2022 12:35
@drew2a drew2a marked this pull request as ready for review April 26, 2022 12:35
@drew2a drew2a requested a review from a team as a code owner April 26, 2022 12:35
Move exceptions close to the top

Remove unnecessary `message``field from exception

Move EVAProtocol to the top of the file

Remove obsolete TransferType

Specify types for EVAProtocol constructor arguments

Remove EVAProtocolMixin

Add ipv8_message_handler

Simplify the callback API

Fix RemoteQueryCommunity

Combine finish_with_result and finish_with_exception into a single method

Move the future to the base Transfer class

Fix send_binary docstring

Fix misleading constant name: MAX_U64 -> MAX_U32

Remove unnecessary `updated` argument from Transfer constructor

Rearrange Transfer arguments; remove block_count from Transfer constructor's argument

Fix definitions of callback types

Show exception class in RemoteQueryCommunity.on_error

Fix incorrect warning in PyCharm

Fix the argument type for EVAProtocol._resend_acknowledge_task()

Move send_write_request from EVAProtocol to OutgoingTransfer

Remove unnecessary send_write_request option from EVAProtocol, you can set retransmit_attempt_count to 0 instead

Minor simplification of _send_write_request_task

Remove IncomingTransfer._create_window() method

Docstring fixes

Restore retransmit_enabled flag

Add protected _on_data_packet method for easier testing

Return bool result from transfer.send_write_request() to simplify tests

Fix EVA tests

Codacy fixes

Remove unused TransferWindow.last_window attribute

Return send_write_request from OutgoingTransfer back to EVAProtocol

Prevent "Future exception was never retrieved" error when the future is not used

Extract make_protocol_decorator to use with different IPv8-based protocols

Split finish args and remove nonce


Add test_block_count_fits_a_single_window


Remove _on_data_packet


Move terminate_by_timeout_task


Increase version


Refactor test_termination_by_timeout
@drew2a drew2a merged commit 4e994cf into Tribler:main Apr 26, 2022
@drew2a
Copy link
Collaborator Author

drew2a commented Apr 26, 2022

🙏 @kozlovsky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants