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

fix: use header_head to determine validators for forwarding transactions #10256

Merged
merged 2 commits into from Nov 28, 2023

Conversation

nikurt
Copy link
Contributor

@nikurt nikurt commented Nov 27, 2023

Functions find_chunk_producer_for_forwarding(), find_validator_for_forwarding() are not used much, one calls another, and they both call chain.head().

That seems unnecessary. Refactored to call get_chunk_producer() directly, and not worry about 3 layers of functions using different types of heads.

See #10251 for context

@nikurt nikurt requested a review from a team as a code owner November 27, 2023 17:53
@nikurt nikurt requested a review from akhi3030 November 27, 2023 17:53
Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (89f1074) 71.86% compared to head (9039c13) 71.86%.

Files Patch % Lines
chain/client/src/view_client.rs 0.00% 8 Missing ⚠️
chain/client/src/client.rs 60.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10256      +/-   ##
==========================================
- Coverage   71.86%   71.86%   -0.01%     
==========================================
  Files         707      707              
  Lines      142244   142237       -7     
  Branches   142244   142237       -7     
==========================================
- Hits       102219   102212       -7     
- Misses      35302    35308       +6     
+ Partials     4723     4717       -6     
Flag Coverage Δ
backward-compatibility 0.08% <0.00%> (+<0.01%) ⬆️
db-migration 0.08% <0.00%> (+<0.01%) ⬆️
genesis-check 1.23% <0.00%> (+<0.01%) ⬆️
integration-tests 36.28% <23.07%> (+0.02%) ⬆️
linux 71.72% <23.07%> (-0.02%) ⬇️
linux-nightly 71.44% <23.07%> (ø)
macos 55.71% <23.07%> (+0.68%) ⬆️
pytests 1.46% <0.00%> (+<0.01%) ⬆️
sanity-checks 1.26% <0.00%> (+<0.01%) ⬆️
unittests 68.21% <23.07%> (+<0.01%) ⬆️
upgradability 0.13% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Collaborator

@akhi3030 akhi3030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nikurt nikurt added this pull request to the merge queue Nov 28, 2023
Merged via the queue into master with commit 3a33ff5 Nov 28, 2023
17 of 19 checks passed
@nikurt nikurt deleted the nikurt-tx-header-head branch November 28, 2023 12:04
nikurt added a commit that referenced this pull request Dec 6, 2023
…ons (#10256)

Functions `find_chunk_producer_for_forwarding()`,
`find_validator_for_forwarding()` are not used much, one calls another,
and they both call `chain.head()`.

That seems unnecessary. Refactored to call `get_chunk_producer()`
directly, and not worry about 3 layers of functions using different
types of heads.

See #10251 for context

(cherry picked from commit 3a33ff5)
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