Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
burrow
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hang Yu
burrow
Commits
82c7213b
Unverified
Commit
82c7213b
authored
8 years ago
by
Benjamin Bollen
Browse files
Options
Downloads
Patches
Plain Diff
manager/eris-mint: clean up comments in relation to internal time
parent
5473ab7e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
manager/eris-mint/eris-mint.go
+5
-5
5 additions, 5 deletions
manager/eris-mint/eris-mint.go
manager/eris-mint/state/state.go
+5
-3
5 additions, 3 deletions
manager/eris-mint/state/state.go
with
10 additions
and
8 deletions
manager/eris-mint/eris-mint.go
+
5
−
5
View file @
82c7213b
...
@@ -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\n
MARMOT TIME: %s
\n\n
"
,
app
.
state
.
LastBlockTime
)
// MARMOT:
appHash
:=
app
.
state
.
Hash
()
appHash
:=
app
.
state
.
Hash
()
fmt
.
Printf
(
"
\n\n
MARMOT 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"
)
}
}
...
...
This diff is collapsed.
Click to expand it.
manager/eris-mint/state/state.go
+
5
−
3
View file @
82c7213b
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment