Fix linting
This commit is contained in:
parent
f60cd5a2b5
commit
98f62db242
|
@ -26,7 +26,7 @@ type CLIContext struct {
|
|||
FromAddress sdk.AccAddress
|
||||
Client rpcclient.Client
|
||||
ChainID string
|
||||
TxGenerator clientx.TxGenerator
|
||||
TxGenerator clientx.Generator
|
||||
Marshaler codec.Marshaler
|
||||
Keybase keys.Keybase
|
||||
Input io.Reader
|
||||
|
@ -136,7 +136,7 @@ func (ctx CLIContext) WithInput(r io.Reader) CLIContext {
|
|||
}
|
||||
|
||||
// WithTxGenerator returns a copy of the CLIContext with an updated TxGenerator.
|
||||
func (ctx CLIContext) WithTxGenerator(txg clientx.TxGenerator) CLIContext {
|
||||
func (ctx CLIContext) WithTxGenerator(txg clientx.Generator) CLIContext {
|
||||
ctx.TxGenerator = txg
|
||||
return ctx
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ import (
|
|||
)
|
||||
|
||||
type (
|
||||
// TxGenerator defines an interface a client can utilize to generate an
|
||||
// Generator defines an interface a client can utilize to generate an
|
||||
// application-defined concrete transaction type. The type returned must
|
||||
// implement ClientTx.
|
||||
TxGenerator interface {
|
||||
Generator interface {
|
||||
NewTx() ClientTx
|
||||
}
|
||||
|
||||
|
|
|
@ -12,10 +12,6 @@ import (
|
|||
"github.com/cosmos/cosmos-sdk/x/gov"
|
||||
)
|
||||
|
||||
type BadEvidence struct {
|
||||
*std.Evidence_Equivocation
|
||||
}
|
||||
|
||||
func TestNewMsgSubmitEvidence(t *testing.T) {
|
||||
s := sdk.AccAddress("foo")
|
||||
e := evidence.Equivocation{
|
||||
|
|
|
@ -8,9 +8,9 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
_ sdk.Tx = (*Transaction)(nil)
|
||||
_ clientx.ClientTx = (*Transaction)(nil)
|
||||
_ clientx.TxGenerator = TxGenerator{}
|
||||
_ sdk.Tx = (*Transaction)(nil)
|
||||
_ clientx.ClientTx = (*Transaction)(nil)
|
||||
_ clientx.Generator = TxGenerator{}
|
||||
)
|
||||
|
||||
// TxGenerator defines a transaction generator that allows clients to construct
|
||||
|
|
|
@ -103,7 +103,7 @@ to handle all the types, but also knows how to generate transactions, signatures
|
|||
and messages.
|
||||
|
||||
```go
|
||||
type TxGenerator interface {
|
||||
type Generator interface {
|
||||
NewTx() ClientTx
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ type ClientTx interface {
|
|||
}
|
||||
```
|
||||
|
||||
We then update `CLIContext` to have two new fields: `TxGenerator` and `TxGenerator`.
|
||||
We then update `CLIContext` to have two new fields: `Generator` and `Generator`.
|
||||
|
||||
Then, each module will at the minimum accept a `Marshaler` instead of a concrete
|
||||
Amino codec. If the module needs to work with any interface types, it will use
|
||||
|
|
Loading…
Reference in New Issue