From 0e993398a63539bcee3ecdcced0467f828b0a310 Mon Sep 17 00:00:00 2001 From: Simon Noetzlin Date: Thu, 2 May 2024 10:37:49 +0200 Subject: [PATCH] update SDK to LSM version --- go.mod | 5 ++++- go.sum | 4 ++-- x/ccv/provider/keeper/hooks.go | 15 ++++++++++----- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index db8b94586c..31b5b35536 100644 --- a/go.mod +++ b/go.mod @@ -202,4 +202,7 @@ require ( ) // following versions might cause unexpected behavior -replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 +replace ( + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.47.12-ics-lsm + github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 +) diff --git a/go.sum b/go.sum index ba33844aa1..49beb46391 100644 --- a/go.sum +++ b/go.sum @@ -342,8 +342,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.47.10 h1:Wxf5yEN3jZbG4fftxAMKB6rpd8ME0mxuCVihpz65dt0= -github.com/cosmos/cosmos-sdk v0.47.10/go.mod h1:UWpgWkhcsBIATS68uUC0del7IiBN4hPv/vqg8Zz23uw= +github.com/cosmos/cosmos-sdk v0.47.12-ics-lsm h1:0yKZnq4pTCx9c3NigPnWcjtZ+YBHroPMAgn72+1i0Sg= +github.com/cosmos/cosmos-sdk v0.47.12-ics-lsm/go.mod h1:9sL4HXReNswcuwsPO33TACJmc+xkxYwHnmcL7rZgu1c= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= diff --git a/x/ccv/provider/keeper/hooks.go b/x/ccv/provider/keeper/hooks.go index ed926f16c7..49ea61c458 100644 --- a/x/ccv/provider/keeper/hooks.go +++ b/x/ccv/provider/keeper/hooks.go @@ -213,29 +213,34 @@ func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.Va // AfterProposalSubmission - call hook if registered // After a consumerAddition proposal submission, a record is created // that maps the proposal ID to the consumer chain ID. -func (h Hooks) AfterProposalSubmission(ctx sdk.Context, proposalID uint64) { +func (h Hooks) AfterProposalSubmission(ctx sdk.Context, proposalID uint64) error { if p, ok := h.GetConsumerAdditionLegacyPropFromProp(ctx, proposalID); ok { h.k.SetProposedConsumerChain(ctx, p.ChainId, proposalID) } + return nil } // AfterProposalVotingPeriodEnded - call hook if registered // After proposal voting ends, the consumer chainID in store is deleted. // When a consumerAddition proposal passes, the consumer chainID is available in providerKeeper.GetAllPendingConsumerAdditionProps // or providerKeeper.GetAllConsumerChains(ctx). -func (h Hooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64) { +func (h Hooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64) error { if _, ok := h.GetConsumerAdditionLegacyPropFromProp(ctx, proposalID); ok { h.k.DeleteProposedConsumerChainInStore(ctx, proposalID) } + return nil } -func (h Hooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) { +func (h Hooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) error { + return nil } -func (h Hooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) { +func (h Hooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) error { + return nil } -func (h Hooks) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64) { +func (h Hooks) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64) error { + return nil } // GetConsumerAdditionLegacyPropFromProp extracts a consumer addition legacy proposal from