cosmos / relayer-archive

An example of a server side IBC relayer to be used for Game of Zones and beyond
56 stars 31 forks source link

Fix to set commands to output flags #88

Closed bluele closed 4 years ago

bluele commented 4 years ago

Hi, there.

sendAndPrint function needs the "text" and "indent" flags, but these are not given to raw commands, so panic is currently occurring at runtime.

Here's the error log:

$ rly --home ./.relayer transactions raw update-client ibc1 ibc0 ibconeclient

panic: flag accessed but not defined: text

goroutine 1 [running]:
github.com/iqlusioninc/relayer/cmd.getPrintingFlags(0xc000ca3b80, 0xc000b7bba0)
        /home/jun/src/relayer/cmd/query.go:622 +0xf3
github.com/iqlusioninc/relayer/cmd.sendAndPrint(0xc000206bd0, 0x1, 0x1, 0xc000cdc900, 0xc000ca3b80, 0x0, 0xc000ceaae0)
        /home/jun/src/relayer/cmd/raw.go:590 +0x2b
github.com/iqlusioninc/relayer/cmd.updateClientCmd.func1(0xc000ca3b80, 0xc000cb68c0, 0x3, 0x5, 0x0, 0x0)
        /home/jun/src/relayer/cmd/raw.go:69 +0x587
github.com/spf13/cobra.(*Command).execute(0xc000ca3b80, 0xc000cb6870, 0x5, 0x5, 0xc000ca3b80, 0xc000cb6870)
        /home/jun/go/1.13.5/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:840 +0x460
github.com/spf13/cobra.(*Command).ExecuteC(0x1f67620, 0x43f13a, 0x1efc600, 0xc000000180)
        /home/jun/go/1.13.5/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:945 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
        /home/jun/go/1.13.5/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:885
github.com/iqlusioninc/relayer/cmd.Execute()
        /home/jun/src/relayer/cmd/root.go:97 +0x55
main.main()
        /home/jun/src/relayer/main.go:21 +0x20
jackzampolin commented 4 years ago

Please see the code over in https://github.com/iqlusioninc/relayer as it is the most up to date.