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

core: fix stateroot height update for testnet #1213

Merged
merged 2 commits into from
Jul 18, 2020

Conversation

roman-khimov
Copy link
Member

When synchronizing with stateroot-enabled network from genesis and if
stateroot is not enabled in block zero we were failing to update state height
because initially it's updated with a jump from 0 to StateRootEnableIndex, so
we should allow that to happen to have correct state height.

@roman-khimov roman-khimov added this to the v0.76.2 milestone Jul 18, 2020
@codecov
Copy link

codecov bot commented Jul 18, 2020

Codecov Report

Merging #1213 into master-2.x will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master-2.x    #1213   +/-   ##
===========================================
  Coverage       67.78%   67.78%           
===========================================
  Files             159      159           
  Lines           15611    15611           
===========================================
  Hits            10582    10582           
  Misses           4507     4507           
  Partials          522      522           
Impacted Files Coverage Δ
pkg/core/blockchain.go 44.80% <0.00%> (ø)
pkg/network/server.go 13.11% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbbe57d...692565c. Read the comment docs.

When synchronizing with stateroot-enabled network from genesis and if
stateroot is not enabled in block zero we were failing to update state height
because initially it's updated with a jump from 0 to StateRootEnableIndex, so
we should allow that to happen to have correct state height.
@roman-khimov roman-khimov force-pushed the fix-stateheight-sync-for-nonzero-enableindex branch from 9cf9c76 to 6d32751 Compare July 18, 2020 07:17
We we missing stateroot for StateRootEnableIndex, starting only with
StateRootEnableIndex + 1.
@roman-khimov roman-khimov merged commit 7d5d6b6 into master-2.x Jul 18, 2020
@roman-khimov roman-khimov deleted the fix-stateheight-sync-for-nonzero-enableindex branch July 18, 2020 18:37
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

1 participant