From ac866226799de9fa8d206635237127a94c832870 Mon Sep 17 00:00:00 2001 From: ylsGit Date: Thu, 11 Jul 2024 16:10:45 +0800 Subject: [PATCH] upd --- Makefile | 1 - x/staking/keeper/validator.go | 4 ++-- x/staking/types/errors.go | 7 +------ x/staking/types/msg.go | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index b731c63519..524c32954f 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,6 @@ ldflags = -X $(GithubTop)/okex/exchain/libs/cosmos-sdk/version.Version=$(Version -X $(GithubTop)/okex/exchain/libs/tendermint/types.MILESTONE_MARS_HEIGHT=$(MarsHeight) - ifeq ($(WITH_ROCKSDB),true) ldflags += -X github.com/okex/exchain/libs/tendermint/types.DBBackend=rocksdb endif diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index 0042f566e9..0e0547dcbd 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -3,11 +3,11 @@ package keeper import ( "bytes" "fmt" - "github.com/okex/exchain/libs/tendermint/crypto" - cryptoAmino "github.com/okex/exchain/libs/tendermint/crypto/encoding/amino" "time" sdk "github.com/okex/exchain/libs/cosmos-sdk/types" + "github.com/okex/exchain/libs/tendermint/crypto" + cryptoAmino "github.com/okex/exchain/libs/tendermint/crypto/encoding/amino" "github.com/okex/exchain/x/staking/types" ) diff --git a/x/staking/types/errors.go b/x/staking/types/errors.go index ce51d77fd3..fddc5a962f 100644 --- a/x/staking/types/errors.go +++ b/x/staking/types/errors.go @@ -59,8 +59,7 @@ const ( CodeTargetValsDuplicate uint32 = 67045 CodeAlreadyBound uint32 = 67046 - CodePubkeyEqual uint32 = 67047 - CodeDescriptionAndPubkeyIsEmpty uint32 = 67048 + CodePubkeyEqual uint32 = 67047 ) var ( @@ -77,10 +76,6 @@ func ErrPubkeyEqual(pubkey string) sdk.EnvelopedErr { return sdk.EnvelopedErr{Err: sdkerrors.New(DefaultCodespace, CodePubkeyEqual, fmt.Sprintf("validator pubkey %s does exist", pubkey))} } -func ErrDescriptionAndPubkeyIsEmpty() sdk.Error { - return sdkerrors.New(DefaultCodespace, CodeDescriptionAndPubkeyIsEmpty, "empty description and pubkey") -} - // ErrInvalidDelegation returns an error when the delegation is invalid func ErrInvalidDelegation(delegator string) sdk.EnvelopedErr { return sdk.EnvelopedErr{Err: sdkerrors.New(DefaultCodespace, CodeInvalidDelegation, diff --git a/x/staking/types/msg.go b/x/staking/types/msg.go index 32816c625c..491525369b 100644 --- a/x/staking/types/msg.go +++ b/x/staking/types/msg.go @@ -162,7 +162,7 @@ func (msg MsgEditValidator) ValidateBasic() error { } if msg.Description == (Description{}) { - return ErrDescriptionAndPubkeyIsEmpty() + return ErrDescriptionIsEmpty() } return nil