Skip to content

Commit

Permalink
Reset app_hash upon InitChain()
Browse files Browse the repository at this point in the history
  • Loading branch information
Lbird committed Jun 11, 2019
1 parent e2ddecc commit a86d1c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions amo/amo.go
Expand Up @@ -229,6 +229,12 @@ func (app *AMOApplication) InitChain(req abci.RequestInitChain) abci.ResponseIni
if FillGenesisState(app.store, genAppState) != nil {
return abci.ResponseInitChain{}
}
app.state.Walk = 0 // TODO: This is an ad-hoc fix!
b := make([]byte, 8)
binary.PutVarint(b, app.state.Walk)
app.state.AppHash = b

saveState(app.state)
app.logger.Info("InitChain: new genesis app state applied.")

return abci.ResponseInitChain{
Expand Down

0 comments on commit a86d1c7

Please sign in to comment.