From 07b157143b380d6090e83b3df3b4dddb74eba659 Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Fri, 1 Feb 2019 16:33:21 -0800 Subject: [PATCH] allow generation of gentxs with empty memo field Let gentx generation continue when gaiad is unable to retrieve machine's external IP and print a warning message. Closes: #3424 --- PENDING.md | 1 + cmd/gaia/init/gentx.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/PENDING.md b/PENDING.md index 531509b0039b..aeade5408dfb 100644 --- a/PENDING.md +++ b/PENDING.md @@ -51,6 +51,7 @@ IMPROVEMENTS * [\#3418](https://github.com/cosmos/cosmos-sdk/issues/3418) Add vesting account genesis validation checks to `GaiaValidateGenesisState`. * [\#3420](https://github.com/cosmos/cosmos-sdk/issues/3420) Added maximum length to governance proposal descriptions and titles + * [\#3424](https://github.com/cosmos/cosmos-sdk/issues/3424) Allow generation of gentxs with empty memo field. * SDK * \#3435 Test that store implementations do not allow nil values diff --git a/cmd/gaia/init/gentx.go b/cmd/gaia/init/gentx.go index 142a9801e039..ec3ae3573946 100644 --- a/cmd/gaia/init/gentx.go +++ b/cmd/gaia/init/gentx.go @@ -61,9 +61,11 @@ following delegation and commission default parameters: if err != nil { return err } + ip, err := server.ExternalIP() if err != nil { - return err + fmt.Fprintf(os.Stderr, "couldn't retrieve an external IP, "+ + "consequently the tx's memo field will be unset: %s", err) } genDoc, err := LoadGenesisDoc(cdc, config.GenesisFile())