Skip to content
Snippets Groups Projects
Unverified Commit 82c7213b authored by Benjamin Bollen's avatar Benjamin Bollen
Browse files

manager/eris-mint: clean up comments in relation to internal time

parent 5473ab7e
No related branches found
No related tags found
No related merge requests found
...@@ -168,13 +168,13 @@ func (app *ErisMint) Commit() (res tmsp.Result) { ...@@ -168,13 +168,13 @@ func (app *ErisMint) Commit() (res tmsp.Result) {
// flush events to listeners (XXX: note issue with blocking) // flush events to listeners (XXX: note issue with blocking)
app.evc.Flush() app.evc.Flush()
// MARMOT: // TODO: [ben] over the tendermint 0.6 TMSP interface we have
// set internal time as two seconds per block // no access to the block header implemented;
// On Tendermint v0.8 load the blockheader into the application
// state and remove the fixed 2-"seconds" per block internal clock.
// NOTE: set internal time as two seconds per block
app.state.LastBlockTime = app.state.LastBlockTime.Add(time.Duration(2) * time.Second) app.state.LastBlockTime = app.state.LastBlockTime.Add(time.Duration(2) * time.Second)
fmt.Printf("\n\nMARMOT TIME: %s\n\n", app.state.LastBlockTime)
// MARMOT:
appHash := app.state.Hash() appHash := app.state.Hash()
fmt.Printf("\n\nMARMOT COMMIT: %X\n\n", appHash)
// return tmsp.NewResultOK(app.state.Hash(), "Success") // return tmsp.NewResultOK(app.state.Hash(), "Success")
return tmsp.NewResultOK(appHash, "Success") return tmsp.NewResultOK(appHash, "Success")
} }
......
...@@ -416,10 +416,12 @@ func MakeGenesisState(db dbm.DB, genDoc *genesis.GenesisDoc) *State { ...@@ -416,10 +416,12 @@ func MakeGenesisState(db dbm.DB, genDoc *genesis.GenesisDoc) *State {
} }
if genDoc.GenesisTime.IsZero() { if genDoc.GenesisTime.IsZero() {
// MARMOT: really? // NOTE: [ben] change GenesisTime to requirement on v0.17
// set time to 11/18/2016 @ 4:09am (UTC) // GenesisTime needs to be deterministic across the chain
// and should be required in the genesis file;
// the requirement is not yet enforced when lacking set
// time to 11/18/2016 @ 4:09am (UTC)
genDoc.GenesisTime = time.Unix(1479442162, 0) genDoc.GenesisTime = time.Unix(1479442162, 0)
// genDoc.GenesisTime = time.Now()
} }
// Make accounts state tree // Make accounts state tree
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment