ibc: add proto message to Header and Misbehaviour (#8278)
* add proto message to Header and Misbehaviour * format
This commit is contained in:
@@ -178,6 +178,8 @@ type ConsensusState interface {
|
||||
|
||||
// Misbehaviour defines counterparty misbehaviour for a specific consensus type
|
||||
type Misbehaviour interface {
|
||||
proto.Message
|
||||
|
||||
ClientType() string
|
||||
GetClientID() string
|
||||
ValidateBasic() error
|
||||
@@ -188,6 +190,8 @@ type Misbehaviour interface {
|
||||
|
||||
// Header is the consensus state update information
|
||||
type Header interface {
|
||||
proto.Message
|
||||
|
||||
ClientType() string
|
||||
GetHeight() Height
|
||||
ValidateBasic() error
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/ibc/core/exported"
|
||||
)
|
||||
|
||||
var _ exported.Header = Header{}
|
||||
var _ exported.Header = &Header{}
|
||||
|
||||
// ClientType defines that the Header is a Solo Machine.
|
||||
func (Header) ClientType() string {
|
||||
|
||||
@@ -59,7 +59,7 @@ func (suite *SoloMachineTestSuite) TestCheckMisbehaviourAndUpdateState() {
|
||||
"invalid misbehaviour type",
|
||||
func() {
|
||||
clientState = solomachine.ClientState()
|
||||
misbehaviour = ibctmtypes.Misbehaviour{}
|
||||
misbehaviour = &ibctmtypes.Misbehaviour{}
|
||||
},
|
||||
false,
|
||||
},
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/ibc/core/exported"
|
||||
)
|
||||
|
||||
var _ exported.Header = Header{}
|
||||
var _ exported.Header = &Header{}
|
||||
|
||||
// ConsensusState returns the updated consensus state associated with the header
|
||||
func (h Header) ConsensusState() *ConsensusState {
|
||||
|
||||
@@ -13,9 +13,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/ibc/core/exported"
|
||||
)
|
||||
|
||||
var (
|
||||
_ exported.Misbehaviour = Misbehaviour{}
|
||||
)
|
||||
var _ exported.Misbehaviour = &Misbehaviour{}
|
||||
|
||||
// NewMisbehaviour creates a new Misbehaviour instance.
|
||||
func NewMisbehaviour(clientID string, header1, header2 *Header) *Misbehaviour {
|
||||
|
||||
Reference in New Issue
Block a user