github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/ibc-go/modules/apps/common/errors.go (about) 1 package common 2 3 import ( 4 "errors" 5 "fmt" 6 7 "github.com/fibonacci-chain/fbc/libs/tendermint/types" 8 9 sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 10 sdkerrors "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types/errors" 11 "github.com/gogo/protobuf/proto" 12 ) 13 14 // IBC port sentinel errors 15 var ( 16 ErrDisableProxyBeforeHeight = sdkerrors.Register(ModuleProxy, 1, "this feature is disable") 17 ) 18 19 func MsgNotSupportBeforeHeight(msg proto.Message, h int64) error { 20 if types.HigherThanVenus4(h) { 21 return nil 22 } 23 return errors.New(fmt.Sprintf("msg:%s not support before height:%d", sdk.MsgTypeURL(msg), types.GetVenus4Height())) 24 }