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

time: introduce marmot time

parent 6f20bdab
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ import (
"bytes"
"fmt"
"sync"
"time"
tendermint_events "github.com/tendermint/go-events"
wire "github.com/tendermint/go-wire"
......@@ -165,7 +166,15 @@ func (app *ErisMint) Commit() (res tmsp.Result) {
// flush events to listeners (XXX: note issue with blocking)
app.evc.Flush()
return tmsp.NewResultOK(app.state.Hash(), "Success")
// MARMOT:
// set internal time as two seconds per block
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()
fmt.Printf("\n\nMARMOT COMMIT: %X\n\n", appHash)
// return tmsp.NewResultOK(app.state.Hash(), "Success")
return tmsp.NewResultOK(appHash, "Success")
}
func (app *ErisMint) Query(query []byte) (res tmsp.Result) {
......
......@@ -413,7 +413,10 @@ func MakeGenesisState(db dbm.DB, genDoc *GenesisDoc) *State {
}
if genDoc.GenesisTime.IsZero() {
genDoc.GenesisTime = time.Now()
// MARMOT: really?
// set time to 11/18/2016 @ 4:09am (UTC)
genDoc.GenesisTime = time.Unix(1479442162, 0)
// genDoc.GenesisTime = time.Now()
}
// 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