Update context

This commit is contained in:
Aleksandr Bezobchuk
2020-03-13 13:59:14 -04:00
parent 7838d750e1
commit c49af0b8dd
4 changed files with 36 additions and 23 deletions
@@ -123,18 +123,11 @@ type ClientTx interface {
}
```
We then extend `codec.Marshaler` to also require fulfillment of `TxGenerator`.
We then update `CLIContext` to have two new fields: `TxGenerator` and `TxGenerator`.
```go
type ClientMarshaler interface {
TxGenerator
codec.Marshaler
}
```
Then, each module will at the minimum accept a `ClientMarshaler` instead of a concrete
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
the `Codec` interface defined by the module which also extends `ClientMarshaler`.
the `Codec` interface defined by the module which also extends `Marshaler`.
## Future Improvements