mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 00:05: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"
|
"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
|
||||||
}
|
}
|
||||||
|
@ -56,9 +56,8 @@ type GenesisState struct {
|
|||||||
// GenesisAccount doesn't need pubkey or sequence
|
// GenesisAccount doesn't need pubkey or sequence
|
||||||
type GenesisAccount struct {
|
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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user