remove unnecessary gentx pub key

This commit is contained in:
rhuairahrighairigh 2018-06-21 14:10:30 +01:00
parent bf5c8487ce
commit 82db02471e
2 changed files with 4 additions and 8 deletions

View File

@ -18,8 +18,8 @@ import (
"github.com/kava-labs/kava/internal/types" "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. // A file, genesis.json, is created 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. // 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. // When `kvd init` is run, a genesis tx is created. Then, from that, an initial app state.
func CreateAppInit() server.AppInit { func CreateAppInit() server.AppInit {
@ -90,7 +90,6 @@ func KavaAppGenState(cdc *wire.Codec, appGenTxs []json.RawMessage) (appState jso
accAuth.Coins = sdk.Coins{ accAuth.Coins = sdk.Coins{
{"KVA", 10000000000}, {"KVA", 10000000000},
} }
accAuth.PubKey = genTx.PubKey
acc := types.NewGenesisAccount(&accAuth) acc := types.NewGenesisAccount(&accAuth)
genaccs[i] = acc genaccs[i] = acc
} }

View File

@ -58,7 +58,6 @@ type GenesisAccount struct {
//Name string `json:"name"` //Name string `json:"name"`
Address sdk.Address `json:"address"` Address sdk.Address `json:"address"`
Coins sdk.Coins `json:"coins"` Coins sdk.Coins `json:"coins"`
PubKey crypto.PubKey `json:"pub_key"` //add in pub key so I can send coins?
} }
func NewGenesisAccount(aa *auth.BaseAccount) GenesisAccount { func NewGenesisAccount(aa *auth.BaseAccount) GenesisAccount {
@ -66,7 +65,6 @@ func NewGenesisAccount(aa *auth.BaseAccount) GenesisAccount {
//Name: aa.Name, //Name: aa.Name,
Address: aa.Address, Address: aa.Address,
Coins: aa.Coins.Sort(), 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{ return &auth.BaseAccount{
Address: ga.Address, Address: ga.Address,
Coins: ga.Coins.Sort(), Coins: ga.Coins.Sort(),
PubKey: ga.PubKey, // add in pub key
}, nil }, nil
} }