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(vertex-handler): modularize methods [part 2/2] #988

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Apr 2, 2024

Depends on #987

Motivation

Modularize on_new_tx() as a prerequisite for the upcoming changes related to multiprocess verification, in order to create a new aysnc on_new_tx() (we should be able to duplicate the method without copying all code).

Acceptance Criteria

  • Rename VertexHandler.on_new_tx() to on_new_vertex().
  • Break on_new_vertex() into modularized methods, _validate_vertex(), _save_and_run_consensus(), and _post_consensus() (renamed from tx_fully_validated()).
  • No behavior should change, only a couple unnecessary assertions were removed.

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
@glevco glevco force-pushed the refactor/multiv/on-new-vertex-2 branch from e7c18db to de99a60 Compare April 2, 2024 17:00
@glevco glevco force-pushed the refactor/multiv/vertex-handler-1 branch from 7637c82 to bc6608a Compare April 2, 2024 18:09
@glevco glevco force-pushed the refactor/multiv/on-new-vertex-2 branch from de99a60 to 6a690a9 Compare April 2, 2024 18:09
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

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

Project coverage is 84.90%. Comparing base (5d3b757) to head (e09d336).

Files Patch % Lines
hathor/vertex_handler/vertex_handler.py 92.30% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #988      +/-   ##
==========================================
- Coverage   84.94%   84.90%   -0.05%     
==========================================
  Files         298      298              
  Lines       22928    22932       +4     
  Branches     3464     3465       +1     
==========================================
- Hits        19476    19470       -6     
- Misses       2767     2772       +5     
- Partials      685      690       +5     

☔ 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 from bc6608a to 6d7db1f Compare April 3, 2024 15:36
@glevco glevco force-pushed the refactor/multiv/on-new-vertex-2 branch from 6a690a9 to e6e5b87 Compare April 3, 2024 15:38
@glevco glevco marked this pull request as ready for review April 3, 2024 15:59
@glevco glevco requested review from jansegre and msbrogli as code owners April 3, 2024 15:59
@glevco glevco changed the title refactor(vertex-handler): modularize methods refactor(vertex-handler): modularize methods [part 2/2] Apr 3, 2024
@glevco glevco force-pushed the refactor/multiv/vertex-handler-1 branch from 6d7db1f to 1a598bc Compare April 14, 2024 20:33
@glevco glevco force-pushed the refactor/multiv/on-new-vertex-2 branch from e6e5b87 to d3f444f Compare April 14, 2024 20:34
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/on-new-vertex-2 branch from d3f444f to 0a3f803 Compare April 23, 2024 22:11
jansegre
jansegre previously approved these changes Apr 24, 2024
@glevco glevco force-pushed the refactor/multiv/vertex-handler-1 branch from 6176f19 to 13e7a24 Compare April 25, 2024 19:54
@glevco glevco force-pushed the refactor/multiv/on-new-vertex-2 branch from 0a3f803 to d4cf46b Compare April 25, 2024 19:55
Base automatically changed from refactor/multiv/vertex-handler-1 to master April 25, 2024 22:44
@glevco glevco dismissed stale reviews from jansegre and msbrogli April 25, 2024 22:44

The base branch was changed.

@glevco glevco force-pushed the refactor/multiv/on-new-vertex-2 branch from d4cf46b to 2cb1780 Compare April 25, 2024 22:46
@glevco glevco force-pushed the refactor/multiv/on-new-vertex-2 branch from 2cb1780 to e09d336 Compare April 26, 2024 17:21
@glevco glevco merged commit a25f3a7 into master Apr 26, 2024
12 checks passed
@glevco glevco deleted the refactor/multiv/on-new-vertex-2 branch April 26, 2024 18:09
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