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

refactor: create VertexHandler [part 1/2] #987

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Apr 2, 2024

Motivation

Move all HathorManager.on_new_tx() related code to its own new class, VertexHandler, improving organization and modularization, and as a prerequisite for the upcoming changes related to multiprocess verification.

Acceptance Criteria

  • Move HathorManager.on_new_tx() implementation to new VertexHandler, along with other methods used only by it.
    • Everything should be moved as-is, no behavior should change. The only exception is that the conn and skip_block_weight_verification arguments were removed, since they were not used.
  • Keep HathorManager.on_new_tx() with a call to VertexHandler.on_new_tx(), compatibility with current code.
  • Update Builder and CliBuilder accordingly.
  • Fix TestBuilder._get_reactor() (it was not persisting the newly created reactor instance).

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco added the refactor label Apr 2, 2024
@glevco glevco self-assigned this Apr 2, 2024
@glevco glevco force-pushed the refactor/multiv/vertex-handler-1 branch from 60cf712 to 7637c82 Compare April 2, 2024 17:00
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 88.31169% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 85.00%. Comparing base (d08ff49) to head (13e7a24).

Files Patch % Lines
hathor/vertex_handler/vertex_handler.py 85.21% 8 Missing and 9 partials ⚠️
hathor/builder/builder.py 96.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #987      +/-   ##
==========================================
+ Coverage   84.92%   85.00%   +0.08%     
==========================================
  Files         296      298       +2     
  Lines       22875    22925      +50     
  Branches     3460     3463       +3     
==========================================
+ Hits        19426    19488      +62     
+ Misses       2764     2756       -8     
+ Partials      685      681       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glevco glevco force-pushed the refactor/multiv/vertex-handler-1 branch 2 times, most recently from bc6608a to 6d7db1f Compare April 3, 2024 15:36
@glevco glevco changed the title refactor: create VertexHandler refactor: create VertexHandler [part 1/2] Apr 3, 2024
@glevco glevco marked this pull request as ready for review April 3, 2024 15:53
@glevco glevco requested review from jansegre and msbrogli as code owners April 3, 2024 15:53
@glevco glevco force-pushed the refactor/multiv/vertex-handler-1 branch from 6d7db1f to 1a598bc Compare April 14, 2024 20:33
msbrogli
msbrogli previously approved these changes Apr 23, 2024
@glevco glevco force-pushed the refactor/multiv/vertex-handler-1 branch from 1a598bc to 6176f19 Compare April 23, 2024 22:08
@glevco glevco force-pushed the refactor/multiv/vertex-handler-1 branch from 6176f19 to 13e7a24 Compare April 25, 2024 19:54
@glevco glevco merged commit 256739a into master Apr 25, 2024
12 checks passed
@glevco glevco deleted the refactor/multiv/vertex-handler-1 branch April 25, 2024 22:44
This was referenced May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants