Remove unnecessary code
This commit is contained in:
parent
339c02af27
commit
a6589949fb
|
@ -318,13 +318,12 @@ type testUpdatePowerTx struct {
|
|||
|
||||
const msgType = "testUpdatePowerTx"
|
||||
|
||||
func (tx testUpdatePowerTx) Type() string { return msgType }
|
||||
func (tx testUpdatePowerTx) Get(key interface{}) (value interface{}) { return nil }
|
||||
func (tx testUpdatePowerTx) GetMsg() sdk.Msg { return tx }
|
||||
func (tx testUpdatePowerTx) GetSignBytes() []byte { return nil }
|
||||
func (tx testUpdatePowerTx) ValidateBasic() sdk.Error { return nil }
|
||||
func (tx testUpdatePowerTx) GetSigners() []sdk.Address { return nil }
|
||||
func (tx testUpdatePowerTx) GetSignatures() []sdk.StdSignature { return nil }
|
||||
func (tx testUpdatePowerTx) Type() string { return msgType }
|
||||
func (tx testUpdatePowerTx) GetMsg() sdk.Msg { return tx }
|
||||
func (tx testUpdatePowerTx) GetSignBytes() []byte { return nil }
|
||||
func (tx testUpdatePowerTx) ValidateBasic() sdk.Error { return nil }
|
||||
func (tx testUpdatePowerTx) GetSigners() []sdk.Address { return nil }
|
||||
func (tx testUpdatePowerTx) GetSignatures() []sdk.StdSignature { return nil }
|
||||
|
||||
func TestValidatorChange(t *testing.T) {
|
||||
|
||||
|
|
|
@ -26,9 +26,8 @@ func NewMsgBond(addr sdk.Address, stake sdk.Coin, pubKey crypto.PubKey) MsgBond
|
|||
}
|
||||
|
||||
//nolint
|
||||
func (msg MsgBond) Type() string { return moduleName } //TODO update "stake/declarecandidacy"
|
||||
func (msg MsgBond) Get(key interface{}) (value interface{}) { return nil }
|
||||
func (msg MsgBond) GetSigners() []sdk.Address { return []sdk.Address{msg.Address} }
|
||||
func (msg MsgBond) Type() string { return moduleName } //TODO update "stake/declarecandidacy"
|
||||
func (msg MsgBond) GetSigners() []sdk.Address { return []sdk.Address{msg.Address} }
|
||||
|
||||
// basic validation of the bond message
|
||||
func (msg MsgBond) ValidateBasic() sdk.Error {
|
||||
|
|
|
@ -13,19 +13,6 @@ type kvstoreTx struct {
|
|||
bytes []byte
|
||||
}
|
||||
|
||||
func (tx kvstoreTx) Get(key interface{}) (value interface{}) {
|
||||
switch k := key.(type) {
|
||||
case string:
|
||||
switch k {
|
||||
case "key":
|
||||
return tx.key
|
||||
case "value":
|
||||
return tx.value
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (tx kvstoreTx) Type() string {
|
||||
return "kvstore"
|
||||
}
|
||||
|
|
13
mock/tx.go
13
mock/tx.go
|
@ -26,19 +26,6 @@ func NewTx(key, value string) kvstoreTx {
|
|||
}
|
||||
}
|
||||
|
||||
func (tx kvstoreTx) Get(key interface{}) (value interface{}) {
|
||||
switch k := key.(type) {
|
||||
case string:
|
||||
switch k {
|
||||
case "key":
|
||||
return tx.key
|
||||
case "value":
|
||||
return tx.value
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (tx kvstoreTx) Type() string {
|
||||
return "kvstore"
|
||||
}
|
||||
|
|
|
@ -171,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 {
|
||||
|
|
Loading…
Reference in New Issue