near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.31k stars 615 forks source link

fix: Fix apply-range ChunkExtra mismatch in apply-range command #11815

Closed tayfunelmas closed 1 month ago

tayfunelmas commented 1 month ago

Similar to #11712 where we use current block's congestion info instead of previous block's.

This fixed replaying blocks for a localnet for me using neard view-state apply-range command.

Note: There are other places in apply* kind of commands that still use previous block, some of them are not quick fixes, so I will first see if we can share more core instead of re-implementing each of them separately.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.75%. Comparing base (2d19c2a) to head (94f76c5).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11815 +/- ## ========================================== - Coverage 71.76% 71.75% -0.01% ========================================== Files 796 796 Lines 163196 163196 Branches 163196 163196 ========================================== - Hits 117115 117107 -8 - Misses 41030 41040 +10 + Partials 5051 5049 -2 ``` | [Flag](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | Coverage Δ | | |---|---|---| | [backward-compatibility](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <0.00%> (ø)` | | | [db-migration](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <0.00%> (ø)` | | | [genesis-check](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.35% <0.00%> (ø)` | | | [integration-tests](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `37.80% <0.00%> (-0.01%)` | :arrow_down: | | [linux](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.37% <100.00%> (-0.01%)` | :arrow_down: | | [linux-nightly](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.35% <100.00%> (-0.01%)` | :arrow_down: | | [macos](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `54.60% <100.00%> (+0.01%)` | :arrow_up: | | [pytests](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.62% <0.00%> (ø)` | | | [sanity-checks](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.42% <0.00%> (ø)` | | | [unittests](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `66.20% <100.00%> (-0.04%)` | :arrow_down: | | [upgradability](https://app.codecov.io/gh/near/nearcore/pull/11815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.28% <0.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.