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

[R4R]: Add upgrade manager #88

Merged
merged 2 commits into from
Mar 18, 2019
Merged

[R4R]: Add upgrade manager #88

merged 2 commits into from
Mar 18, 2019

Conversation

yutianwu
Copy link
Contributor

Description

Add upgrade manager.

Add a global variable for current height. So we can access the height easily in places where we want if we decide to fork.

Rationale

Example

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • integration tests passed (make integration_test)
  • manual transaction test passed (cli invoke)

Already reviewed by

...

Related issues

... reference related issue #'s here ...

@@ -339,6 +344,8 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC
app.SetDeliverState(abci.Header{ChainID: req.ChainId})
app.SetCheckState(abci.Header{ChainID: req.ChainId})

sdk.UpgradeMgr.SetHeight(1)
Copy link
Contributor

@rickyyangz rickyyangz Mar 18, 2019

Choose a reason for hiding this comment

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

do not need this

types/upgrade.go Outdated
return mgr.Height
}

func (mgr UpgradeManager) IsFixMatchEngineFork() bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

too common name.

@@ -506,6 +508,8 @@ func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeg
))
}

sdk.UpgradeMgr.SetHeight(req.Header.Height)
Copy link
Contributor

Choose a reason for hiding this comment

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

check the recover.

@yutianwu yutianwu force-pushed the feature/add_upgrade branch from b284af0 to b04aa8f Compare March 18, 2019 09:37
@yutianwu yutianwu changed the title [WIP]: Add upgrade manager [R4R]: Add upgrade manager Mar 18, 2019
@yutianwu yutianwu merged commit 802079e into develop Mar 18, 2019
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.

4 participants