diff --git a/PENDING.md b/PENDING.md index 5b4048888c..9a92a7c0f9 100644 --- a/PENDING.md +++ b/PENDING.md @@ -53,4 +53,5 @@ BUG FIXES * \#1797 Fix off-by-one error in slashing for downtime * \#1787 Fixed bug where Tally fails due to revoked/unbonding validator * \#1766 Fixes bad example for keybase identity -* \#1799 Fix `gaiad export` +* \#1804 Fixes gen-tx genesis generation logic temporarily until upstream updates +* \#1799 Fix `gaiad export` \ No newline at end of file diff --git a/server/init.go b/server/init.go index a644c0c1ae..39f3d0b7f8 100644 --- a/server/init.go +++ b/server/init.go @@ -48,9 +48,10 @@ var ( // genesis piece structure for creating combined genesis type GenesisTx struct { - NodeID string `json:"node_id"` - IP string `json:"ip"` - AppGenTx json.RawMessage `json:"app_gen_tx"` + NodeID string `json:"node_id"` + IP string `json:"ip"` + Validator tmtypes.GenesisValidator `json:"validator"` + AppGenTx json.RawMessage `json:"app_gen_tx"` } // Storage for init command input parameters @@ -120,15 +121,16 @@ func gentxWithConfig(cdc *wire.Codec, appInit AppInit, config *cfg.Config, genTx nodeID := string(nodeKey.ID()) pubKey := readOrCreatePrivValidator(config) - appGenTx, cliPrint, _, err := appInit.AppGenTx(cdc, pubKey, genTxConfig) + appGenTx, cliPrint, validator, err := appInit.AppGenTx(cdc, pubKey, genTxConfig) if err != nil { return } tx := GenesisTx{ - NodeID: nodeID, - IP: genTxConfig.IP, - AppGenTx: appGenTx, + NodeID: nodeID, + IP: genTxConfig.IP, + Validator: validator, + AppGenTx: appGenTx, } bz, err := wire.MarshalJSONIndent(cdc, tx) if err != nil { @@ -310,6 +312,7 @@ func processGenTxs(genTxsDir string, cdc *wire.Codec) ( genTx := genTxs[nodeID] // combine some stuff + validators = append(validators, genTx.Validator) appGenTxs = append(appGenTxs, genTx.AppGenTx) // Add a persistent peer