Merge PR #3316: Fix regression in gaiacli config file handling

* --chain-id must be a persistent flag to be successfully read from config
* Prevent panic when not enough arguments
* Add docs on gaiacli config
* Small tweak
This commit is contained in:
Alessio Treglia
2019-01-17 16:40:34 +01:00
committed by Christopher Goes
parent 7fbc2822e8
commit 20bcacfaf4
10 changed files with 29 additions and 19 deletions
+2 -1
View File
@@ -98,6 +98,7 @@ func InitFixtures(t *testing.T) (f *Fixtures) {
// NOTE: GDInit sets the ChainID
f.GDInit(keyFoo)
f.CLIConfig("chain-id", f.ChainID)
// Start an account with tokens
f.AddGenesisAccount(f.KeyAddress(keyFoo), startCoins)
@@ -117,7 +118,7 @@ func (f *Fixtures) Cleanup(dirs ...string) {
// Flags returns the flags necessary for making most CLI calls
func (f *Fixtures) Flags() string {
return fmt.Sprintf("--home=%s --node=%s --chain-id=%s", f.GCLIHome, f.RPCAddr, f.ChainID)
return fmt.Sprintf("--home=%s --node=%s", f.GCLIHome, f.RPCAddr)
}
//___________________________________________________________________________________