Merge pull request #895 from cosmos/sunny/remove-msg-get

Remove Get function from Msg interface
This commit is contained in:
Rigel
2018-04-30 22:12:19 -04:00
committed by GitHub
18 changed files with 30 additions and 145 deletions
-3
View File
@@ -37,9 +37,6 @@ type Account interface {
GetCoins() Coins
SetCoins(Coins) error
Get(key interface{}) (value interface{}, err error)
Set(key interface{}, value interface{}) error
}
// AccountMapper stores and retrieves accounts from stores
+1 -5
View File
@@ -11,9 +11,6 @@ type Msg interface {
// Must be alphanumeric or empty.
Type() string
// Get some property of the Msg.
Get(key interface{}) (value interface{})
// Get the canonical byte representation of the Msg.
GetSignBytes() []byte
@@ -174,8 +171,7 @@ func NewTestMsg(addrs ...Address) *TestMsg {
}
//nolint
func (msg *TestMsg) Type() string { return "TestMsg" }
func (msg *TestMsg) Get(key interface{}) (value interface{}) { return nil }
func (msg *TestMsg) Type() string { return "TestMsg" }
func (msg *TestMsg) GetSignBytes() []byte {
bz, err := json.Marshal(msg.signers)
if err != nil {