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
aaf27e9b
Unverified
Commit
aaf27e9b
authored
8 years ago
by
Benjamin Bollen
Browse files
Options
Downloads
Patches
Plain Diff
eris-mint: remove lingering genesis/types
parent
3270d0c5
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/state/genesis_test.go
+1
-1
1 addition, 1 deletion
manager/eris-mint/state/genesis_test.go
manager/eris-mint/state/types/genesis.go
+0
-63
0 additions, 63 deletions
manager/eris-mint/state/types/genesis.go
with
1 addition
and
64 deletions
manager/eris-mint/state/genesis_test.go
+
1
−
1
View file @
aaf27e9b
...
...
@@ -31,7 +31,7 @@ var g1 = fmt.Sprintf(`
{
"address": "%X",
"amount": %d,
"name": "%s",
"name": "%s",
"permissions": {
"base": {
"perms": %d,
...
...
This diff is collapsed.
Click to expand it.
manager/eris-mint/state/types/genesis.go
deleted
100644 → 0
+
0
−
63
View file @
3270d0c5
package
types
import
(
"fmt"
"time"
"github.com/eris-ltd/eris-db/common/sanity"
ptypes
"github.com/eris-ltd/eris-db/permission/types"
"github.com/tendermint/go-crypto"
"github.com/tendermint/go-wire"
)
//------------------------------------------------------------
// we store the gendoc in the db
var
GenDocKey
=
[]
byte
(
"GenDocKey"
)
//------------------------------------------------------------
// core types for a genesis definition
type
BasicAccount
struct
{
Address
[]
byte
`json:"address"`
Amount
int64
`json:"amount"`
}
type
GenesisAccount
struct
{
Address
[]
byte
`json:"address"`
Amount
int64
`json:"amount"`
Name
string
`json:"name"`
Permissions
*
ptypes
.
AccountPermissions
`json:"permissions"`
}
type
GenesisValidator
struct
{
PubKey
crypto
.
PubKey
`json:"pub_key"`
Amount
int64
`json:"amount"`
Name
string
`json:"name"`
UnbondTo
[]
BasicAccount
`json:"unbond_to"`
}
type
GenesisParams
struct
{
GlobalPermissions
*
ptypes
.
AccountPermissions
`json:"global_permissions"`
}
type
GenesisDoc
struct
{
GenesisTime
time
.
Time
`json:"genesis_time"`
ChainID
string
`json:"chain_id"`
Params
*
GenesisParams
`json:"params"`
Accounts
[]
GenesisAccount
`json:"accounts"`
Validators
[]
GenesisValidator
`json:"validators"`
}
//------------------------------------------------------------
// Make genesis state from file
func
GenesisDocFromJSON
(
jsonBlob
[]
byte
)
(
genState
*
GenesisDoc
)
{
var
err
error
wire
.
ReadJSONPtr
(
&
genState
,
jsonBlob
,
&
err
)
if
err
!=
nil
{
sanity
.
PanicCrisis
(
fmt
.
Sprintf
(
"Couldn't read GenesisDoc: %v"
,
err
))
}
return
}
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