mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-25 07:45:18 +00:00
remove unnecessary gentx pub key
This commit is contained in:
parent
bf5c8487ce
commit
82db02471e
@ -18,8 +18,8 @@ import (
|
||||
"github.com/kava-labs/kava/internal/types"
|
||||
)
|
||||
|
||||
// I want to be able to create a genesis.json with the initial state of the kava network.
|
||||
// This is done by creating a custom AppInit object to be handed to the server when it creates commands.
|
||||
// A file, genesis.json, is created with the initial state of the kava network.
|
||||
// This is done by creating an AppInit object to be handed to the server when it creates commands.
|
||||
// When `kvd init` is run, a genesis tx is created. Then, from that, an initial app state.
|
||||
|
||||
func CreateAppInit() server.AppInit {
|
||||
@ -90,7 +90,6 @@ func KavaAppGenState(cdc *wire.Codec, appGenTxs []json.RawMessage) (appState jso
|
||||
accAuth.Coins = sdk.Coins{
|
||||
{"KVA", 10000000000},
|
||||
}
|
||||
accAuth.PubKey = genTx.PubKey
|
||||
acc := types.NewGenesisAccount(&accAuth)
|
||||
genaccs[i] = acc
|
||||
}
|
||||
|
@ -56,9 +56,8 @@ type GenesisState struct {
|
||||
// GenesisAccount doesn't need pubkey or sequence
|
||||
type GenesisAccount struct {
|
||||
//Name string `json:"name"`
|
||||
Address sdk.Address `json:"address"`
|
||||
Coins sdk.Coins `json:"coins"`
|
||||
PubKey crypto.PubKey `json:"pub_key"` //add in pub key so I can send coins?
|
||||
Address sdk.Address `json:"address"`
|
||||
Coins sdk.Coins `json:"coins"`
|
||||
}
|
||||
|
||||
func NewGenesisAccount(aa *auth.BaseAccount) GenesisAccount {
|
||||
@ -66,7 +65,6 @@ func NewGenesisAccount(aa *auth.BaseAccount) GenesisAccount {
|
||||
//Name: aa.Name,
|
||||
Address: aa.Address,
|
||||
Coins: aa.Coins.Sort(),
|
||||
PubKey: aa.PubKey, // add in pub key
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,6 +73,5 @@ func (ga *GenesisAccount) ToAppAccount() (acc *auth.BaseAccount, err error) {
|
||||
return &auth.BaseAccount{
|
||||
Address: ga.Address,
|
||||
Coins: ga.Coins.Sort(),
|
||||
PubKey: ga.PubKey, // add in pub key
|
||||
}, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user