diff --git a/tests/integration/common.go b/tests/integration/common.go index 13488bd7e6..66fd79c6eb 100644 --- a/tests/integration/common.go +++ b/tests/integration/common.go @@ -373,7 +373,7 @@ func checkRedelegationEntryCompletionTime( func getStakingUnbondingDelegationEntry(ctx sdk.Context, k testutil.TestStakingKeeper, id uint64) (stakingUnbondingOp stakingtypes.UnbondingDelegationEntry, found bool) { stakingUbd, err := k.GetUnbondingDelegationByUnbondingID(ctx, id) if err != nil { - panic(fmt.Sprintf("could not get unbonding delegation", err)) + panic(fmt.Sprintf("could not get unbonding delegation: %v", err)) } found = false diff --git a/tests/integration/setup.go b/tests/integration/setup.go index b4424b73de..93b986e43c 100644 --- a/tests/integration/setup.go +++ b/tests/integration/setup.go @@ -3,7 +3,6 @@ package integration import ( "context" "fmt" - "sync" "testing" storetypes "cosmossdk.io/store/types" @@ -172,9 +171,11 @@ func (s *CCVTestSuite) registerPacketSniffer(chain *ibctesting.TestChain) { s.packetSniffers = make(map[*ibctesting.TestChain]*packetSniffer) } p := newPacketSniffer() - listeners := []storetypes.ABCIListener{p} - streamingManager := storetypes.StreamingManager{ABCIListeners: listeners, StopNodeOnErr: true} - chain.App.GetBaseApp().SetStreamingManager(streamingManager) + // listeners := []storetypes.ABCIListener{p} + // streamingManager := storetypes.StreamingManager{ABCIListeners: listeners, StopNodeOnErr: true} + chain.App.GetBaseApp().SetStreamingManager(store.StreamingManager{ + ABCIListeners: []store.ABCIListener{p}, + }) s.packetSniffers[chain] = p } @@ -381,6 +382,8 @@ func preProposalKeyAssignment(s *CCVTestSuite, chainID string) { } } +var _ store.ABCIListener = &packetSniffer{} + // packetSniffer implements the StreamingService interface. // Implements ListenFinalizeBlock to record packets from events. type packetSniffer struct { @@ -414,25 +417,25 @@ func (*packetSniffer) ListenCommit(ctx context.Context, res abci.ResponseCommit, return nil } -func (*packetSniffer) Close() error { return nil } -func (*packetSniffer) Listeners() map[store.StoreKey][]store.ABCIListener { return nil } -func (*packetSniffer) Stream(wg *sync.WaitGroup) error { return nil } - -// [legacy simibc method] -// ABCIToSDKEvents converts a list of ABCI events to Cosmos SDK events. -func ABCIToSDKEvents(abciEvents []abci.Event) sdk.Events { - var events sdk.Events - for _, evt := range abciEvents { - var attributes []sdk.Attribute - for _, attr := range evt.GetAttributes() { - attributes = append(attributes, sdk.NewAttribute(attr.Key, attr.Value)) - } - - events = events.AppendEvent(sdk.NewEvent(evt.GetType(), attributes...)) - } - - return events -} +// func (*packetSniffer) Close() error { return nil } +// func (*packetSniffer) Listeners() map[store.StoreKey][]store.ABCIListener { return nil } +// func (*packetSniffer) Stream(wg *sync.WaitGroup) error { return nil } + +// // [legacy simibc method] +// // ABCIToSDKEvents converts a list of ABCI events to Cosmos SDK events. +// func ABCIToSDKEvents(abciEvents []abci.Event) sdk.Events { +// var events sdk.Events +// for _, evt := range abciEvents { +// var attributes []sdk.Attribute +// for _, attr := range evt.GetAttributes() { +// attributes = append(attributes, sdk.NewAttribute(attr.Key, attr.Value)) +// } + +// events = events.AppendEvent(sdk.NewEvent(evt.GetType(), attributes...)) +// } + +// return events +// } // [legacy simibc method] // ParsePacketsFromEvents returns all packets found in events.