Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Convert iterators to array getters #596

Merged
merged 54 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
5e1a187
WIP convert iterators to array getters.
jtremback Dec 14, 2022
9c7bf44
WIP - compiles, fixing tests
jtremback Dec 14, 2022
c19cb8d
Unit and e2e tests work
jtremback Dec 15, 2022
c1e693e
add notes about stopping iteration
jtremback Dec 15, 2022
789997c
WIP - rename and add some notes
jtremback Dec 15, 2022
43489eb
Add types to proto
jtremback Dec 15, 2022
ce77f0a
delete unused code
jtremback Dec 15, 2022
f00ac6d
resolve naming conflict
jtremback Dec 16, 2022
a82e5ee
implement another type as proto
jtremback Dec 16, 2022
b29f08e
fixing more stuff
jtremback Dec 16, 2022
b6cb90a
delete TODOJEHAN.md
jtremback Dec 16, 2022
378f67d
adds many of Marius's iteration order comments from 599, and does som…
jtremback Dec 16, 2022
2663554
fix nil pointer deref
jtremback Dec 19, 2022
7ca833e
call GetAllConsumerChains once
mpoke Dec 19, 2022
74aaebc
expand TestGetAllChannelToChains
mpoke Dec 19, 2022
f8613c7
expand TestGetAllUnbondingOps
mpoke Dec 19, 2022
40ffea5
GetAllUnbondingOpIndexes; cleanup proto files
mpoke Dec 19, 2022
643ae1c
fix GetAllValsetUpdateBlockHeights and UTs
mpoke Dec 19, 2022
b9706cf
remove GetAllSlashAck
mpoke Dec 19, 2022
02eb634
add tests for GetFirstVscSendTimestamp
mpoke Dec 19, 2022
c67eb74
key assignment iterators
mpoke Dec 19, 2022
58d5c28
reviewed proposals
mpoke Dec 19, 2022
f876368
add TestGetAllValsetUpdateBlockHeights
mpoke Dec 19, 2022
63707e1
add TestGetAllOutstandingDowntimes
mpoke Dec 19, 2022
8d4c4da
add GetElapsedPacketMaturityTimes
mpoke Dec 19, 2022
28ad814
fix merge conflicts
mpoke Dec 19, 2022
d9f4358
fix linter
mpoke Dec 19, 2022
b14ff29
fix linter
mpoke Dec 19, 2022
87ed959
prevent implicit memory aliasing
mpoke Dec 19, 2022
4259d30
add UTC to TestPacketMaturityTime
mpoke Dec 19, 2022
e1fa7c7
fix TestPacketMaturityTime
mpoke Dec 19, 2022
6a5136e
avoid local variable name shadowing
mpoke Dec 20, 2022
a5fee38
fix merge conflict
mpoke Dec 20, 2022
9a04275
Merge branch 'main' into iterators-to-arrays
mpoke Dec 20, 2022
a2c93d2
Update x/ccv/consumer/keeper/keeper.go
mpoke Dec 21, 2022
3b80893
replace cases with packets in TestPacketMaturityTime
mpoke Dec 21, 2022
3e3f10b
add expected order to TestPacketMaturityTime
mpoke Dec 21, 2022
b4112f7
add expected order to TestGetAllHeightToValsetUpdateIDs
mpoke Dec 21, 2022
4177544
add expected order to TestGetAllOutstandingDowntimes
mpoke Dec 21, 2022
60732d5
add TestGetAllCCValidator
mpoke Dec 21, 2022
fe16a62
add expected order to TestGetAllConsumerChains
mpoke Dec 21, 2022
5229c7e
add expected order to TestGetAllChannelToChains
mpoke Dec 21, 2022
649d105
add expected order to TestGetAllUnbondingOps
mpoke Dec 21, 2022
56f957e
add expected order to TestGetAllUnbondingOpIndexes
mpoke Dec 21, 2022
9a7b31b
add expected order to TestGetAllValsetUpdateBlockHeights
mpoke Dec 21, 2022
69b050b
add expected order to TestInitTimeoutTimestamp
mpoke Dec 21, 2022
2aca355
add expected order to TestVscSendTimestamp
mpoke Dec 21, 2022
4fc4736
add expected order to TestGetAllValidatorConsumerPubKey
mpoke Dec 21, 2022
ec5645c
add expected order to TestGetAllValidatorsByConsumerAddr
mpoke Dec 21, 2022
a2ec7bc
add expected order to TestGetAllKeyAssignmentReplacements
mpoke Dec 21, 2022
352a426
add expected order to TestGetAllConsumerAddrsToPrune
mpoke Dec 21, 2022
eca0844
Add test for GetSlashAndTrailingData (#623)
shaspitz Dec 21, 2022
78bcaae
use InitTimeoutTimestamp instead of two slices
mpoke Dec 21, 2022
253576a
Fix: Change keys for storing proposals (#620)
mpoke Dec 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion proto/interchain_security/ccv/provider/v1/provider.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
import "ibc/core/client/v1/client.proto";
import "ibc/lightclients/tendermint/v1/tendermint.proto";
import "tendermint/crypto/keys.proto";

// ConsumerAdditionProposal is a governance proposal on the provider chain to spawn a new consumer chain.
// If it passes, then all validators on the provider chain are expected to validate the consumer chain at spawn time
Expand Down Expand Up @@ -133,4 +134,31 @@ message ConsumerRemovalProposals {
// AddressList contains a list of consensus addresses
message AddressList {
repeated bytes addresses = 1;
}
}

message ChannelToChain {
string channel_id = 1;
string chain_id = 2;
}

message VscUnbondingOps {
uint64 vsc_id = 1;
repeated uint64 unbonding_op_ids = 2;
}

message InitTimeoutTimestamp {
string chain_id = 1;
uint64 timestamp = 2;
}

message VscSendTimestamp {
uint64 vsc_id = 1;
google.protobuf.Timestamp timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
}

message KeyAssignmentReplacement {
bytes provider_addr = 1;
tendermint.crypto.PublicKey prev_c_key = 2;
int64 power = 3;
}

8 changes: 3 additions & 5 deletions tests/difference/core/driver/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,9 @@ func (s *CoreSuite) TestAssumptions() {
s.Require().Empty(s.consumerKeeper().GetPendingPackets(s.ctx(C)))

// Consumer has no maturities
s.consumerKeeper().IteratePacketMaturityTime(s.ctx(C),
func(vscId uint64, timeNs uint64) (stop bool) {
s.T().Fatal(FAIL_MSG)
return false // Don't stop
})
for _, _ = range s.consumerKeeper().GetAllPacketMaturityTimes(s.ctx(C), nil) {
s.T().Fatal(FAIL_MSG)
}

// Consumer power
for i := 0; i < len(initState.ValStates.Status); i++ {
Expand Down
23 changes: 9 additions & 14 deletions tests/e2e/stop_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,16 @@ func (s *CCVTestSuite) checkConsumerChainIsRemoved(chainID string, checkChannel
}

// check UnbondingOps were deleted and undelegation entries aren't onHold
providerKeeper.IterateOverUnbondingOpIndex(
s.providerCtx(),
chainID,
func(vscID uint64, ubdIndex []uint64) (stop bool) {
_, found := providerKeeper.GetUnbondingOpIndex(s.providerCtx(), chainID, uint64(vscID))
for _, unbondingOpsIndex := range providerKeeper.GetAllUnbondingOpIndexes(s.providerCtx(), chainID) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't really review this logic without more context or comments. It looks like nothing changed besides

IterateOverUnbondingOpIndex becoming GetAllUnbondingOpIndexes ?

_, found := providerKeeper.GetUnbondingOpIndex(s.providerCtx(), chainID, unbondingOpsIndex.VscId)
s.Require().False(found)
for _, ubdID := range unbondingOpsIndex.UnbondingOpIds {
_, found = providerKeeper.GetUnbondingOp(s.providerCtx(), unbondingOpsIndex.UnbondingOpIds[ubdID])
s.Require().False(found)
for _, ubdID := range ubdIndex {
_, found = providerKeeper.GetUnbondingOp(s.providerCtx(), ubdIndex[ubdID])
s.Require().False(found)
ubd, _ := providerStakingKeeper.GetUnbondingDelegationByUnbondingID(s.providerCtx(), ubdIndex[ubdID])
s.Require().Zero(ubd.Entries[ubdID].UnbondingOnHoldRefCount)
}
return false // do not stop the iteration
},
)
ubd, _ := providerStakingKeeper.GetUnbondingDelegationByUnbondingID(s.providerCtx(), unbondingOpsIndex.UnbondingOpIds[ubdID])
s.Require().Zero(ubd.Entries[ubdID].UnbondingOnHoldRefCount)
}
}

// verify consumer chain's states are removed
_, found := providerKeeper.GetConsumerGenesis(s.providerCtx(), chainID)
Expand Down
35 changes: 5 additions & 30 deletions x/ccv/consumer/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,34 +118,9 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *consumertypes.GenesisSt
panic("provider client does not exist")
}

maturingPackets := []consumertypes.MaturingVSCPacket{}
k.IteratePacketMaturityTime(ctx, func(vscId, timeNs uint64) (stop bool) {
mat := consumertypes.MaturingVSCPacket{
VscId: vscId,
MaturityTime: timeNs,
}
maturingPackets = append(maturingPackets, mat)
return false // do not stop the iteration
})

heightToVCIDs := []consumertypes.HeightToValsetUpdateID{}
k.IterateHeightToValsetUpdateID(ctx, func(height, vscID uint64) (stop bool) {
hv := consumertypes.HeightToValsetUpdateID{
Height: height,
ValsetUpdateId: vscID,
}
heightToVCIDs = append(heightToVCIDs, hv)
return false // do not stop the iteration
})

outstandingDowntimes := []consumertypes.OutstandingDowntime{}
k.IterateOutstandingDowntime(ctx, func(addr string) (stop bool) {
od := consumertypes.OutstandingDowntime{
ValidatorConsensusAddress: addr,
}
outstandingDowntimes = append(outstandingDowntimes, od)
return false // do not stop the iteration
})
maturingPackets := k.GetAllPacketMaturityTimes(ctx, nil)

outstandingDowntimes := k.GetAllOutstandingDowntimes(ctx)

// TODO: update GetLastTransmissionBlockHeight to not return an error
ltbh, err := k.GetLastTransmissionBlockHeight(ctx)
Expand All @@ -158,7 +133,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *consumertypes.GenesisSt
channelID,
maturingPackets,
valset,
k.GetHeightToValsetUpdateIDs(ctx),
k.GetAllHeightToValsetUpdateIDs(ctx),
k.GetPendingPackets(ctx),
outstandingDowntimes,
*ltbh,
Expand All @@ -178,7 +153,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *consumertypes.GenesisSt
"",
nil,
valset,
k.GetHeightToValsetUpdateIDs(ctx),
k.GetAllHeightToValsetUpdateIDs(ctx),
k.GetPendingPackets(ctx),
nil,
consumertypes.LastTransmissionBlockHeight{},
Expand Down
12 changes: 6 additions & 6 deletions x/ccv/consumer/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func TestInitGenesis(t *testing.T) {
require.Equal(t, vscID, ck.GetPacketMaturityTime(ctx, vscID))
require.Equal(t, pendingDataPackets, ck.GetPendingPackets(ctx))

require.Equal(t, gs.OutstandingDowntimeSlashing, ck.GetOutstandingDowntimes(ctx))
require.Equal(t, gs.OutstandingDowntimeSlashing, ck.GetAllOutstandingDowntimes(ctx))

ltbh, err := ck.GetLastTransmissionBlockHeight(ctx)
require.NoError(t, err)
Expand Down Expand Up @@ -382,10 +382,10 @@ func assertProviderClientID(t *testing.T, ctx sdk.Context, ck *consumerkeeper.Ke
// assert that the given input match the height to valset update ID mappings in the store
func assertHeightValsetUpdateIDs(t *testing.T, ctx sdk.Context, ck *consumerkeeper.Keeper, heighValsetUpdateIDs []consumertypes.HeightToValsetUpdateID) {
ctr := 0
ck.IterateHeightToValsetUpdateID(ctx, func(height uint64, vscID uint64) (stop bool) {
require.Equal(t, heighValsetUpdateIDs[ctr].Height, height)
require.Equal(t, heighValsetUpdateIDs[ctr].ValsetUpdateId, vscID)

for _, heightToValsetUpdateID := range ck.GetAllHeightToValsetUpdateIDs(ctx) {
require.Equal(t, heighValsetUpdateIDs[ctr].Height, heightToValsetUpdateID.Height)
require.Equal(t, heighValsetUpdateIDs[ctr].ValsetUpdateId, heightToValsetUpdateID.ValsetUpdateId)
ctr++
return false
})
}
}
76 changes: 30 additions & 46 deletions x/ccv/consumer/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,24 +206,32 @@ func (k Keeper) DeletePendingChanges(ctx sdk.Context) {
store.Delete(types.PendingChangesKey())
}

// IteratePacketMaturityTime iterates through the VSC packet maturity times set in the store
func (k Keeper) IteratePacketMaturityTime(ctx sdk.Context, cb func(vscId, timeNs uint64) (stop bool)) {
// GetAllPacketMaturityTimes returns a slice of PacketMaturityTimes, sorted by maturity time.
func (k Keeper) GetAllPacketMaturityTimes(ctx sdk.Context, latest *uint64) (packetMaturityTimes []consumertypes.MaturingVSCPacket) {
mpoke marked this conversation as resolved.
Show resolved Hide resolved
store := ctx.KVStore(k.storeKey)
iterator := sdk.KVStorePrefixIterator(store, []byte{types.PacketMaturityTimeBytePrefix})

defer iterator.Close()
for ; iterator.Valid(); iterator.Next() {
// Extract bytes following the 1 byte prefix
seqBytes := iterator.Key()[1:]
seq := binary.BigEndian.Uint64(seqBytes)
vscIdBytes := iterator.Key()[1:]
vscId := binary.BigEndian.Uint64(vscIdBytes)

timeNs := binary.BigEndian.Uint64(iterator.Value())

stop := cb(seq, timeNs)
if stop {
// If the `latest` parameter is not nil, we want to stop iterating when we reach
// a maturityTime that is after the `latest` time, because we want no maturities
// after the `latest` time.
mpoke marked this conversation as resolved.
Show resolved Hide resolved
if latest != nil && *latest < timeNs {
break
}

packetMaturityTimes = append(packetMaturityTimes, consumertypes.MaturingVSCPacket{
VscId: vscId,
MaturityTime: timeNs,
})
}
return packetMaturityTimes
}

// SetPacketMaturityTime sets the maturity time for a given received VSC packet id
Expand Down Expand Up @@ -299,8 +307,8 @@ func (k Keeper) DeleteHeightValsetUpdateID(ctx sdk.Context, height uint64) {
store.Delete(types.HeightValsetUpdateIDKey(height))
}

// IterateHeightToValsetUpdateID iterates over the block height to valset update ID mapping in store
func (k Keeper) IterateHeightToValsetUpdateID(ctx sdk.Context, cb func(height, vscID uint64) (stop bool)) {
// GetAllHeightToValsetUpdateIDs returns a list of all the block heights to valset update IDs in the store
func (k Keeper) GetAllHeightToValsetUpdateIDs(ctx sdk.Context) (heightToValsetUpdateIDs []types.HeightToValsetUpdateID) {
store := ctx.KVStore(k.storeKey)
iterator := sdk.KVStorePrefixIterator(store, []byte{types.HeightValsetUpdateIDBytePrefix})

Expand All @@ -311,11 +319,13 @@ func (k Keeper) IterateHeightToValsetUpdateID(ctx sdk.Context, cb func(height, v

vscID := binary.BigEndian.Uint64(iterator.Value())

stop := cb(height, vscID)
if stop {
break
}
heightToValsetUpdateIDs = append(heightToValsetUpdateIDs, types.HeightToValsetUpdateID{
Height: height,
ValsetUpdateId: vscID,
})
}

return heightToValsetUpdateIDs
}

// OutstandingDowntime returns the outstanding downtime flag for a given validator
Expand All @@ -341,20 +351,22 @@ func (k Keeper) DeleteOutstandingDowntime(ctx sdk.Context, consAddress string) {
store.Delete(types.OutstandingDowntimeKey(consAddr))
}

// IterateOutstandingDowntime iterates over the validator addresses of outstanding downtime flags
func (k Keeper) IterateOutstandingDowntime(ctx sdk.Context, cb func(address string) (stop bool)) {
// GetAllOutstandingDowntimes gets an array of the validator addresses of outstanding downtime flags
func (k Keeper) GetAllOutstandingDowntimes(ctx sdk.Context) (downtimes []consumertypes.OutstandingDowntime) {
mpoke marked this conversation as resolved.
Show resolved Hide resolved
store := ctx.KVStore(k.storeKey)
iterator := sdk.KVStorePrefixIterator(store, []byte{types.OutstandingDowntimeBytePrefix})

defer iterator.Close()
for ; iterator.Valid(); iterator.Next() {
addrBytes := iterator.Key()[1:]
addr := sdk.ConsAddress(addrBytes).String()
stop := cb(addr)
if stop {
break
}

downtimes = append(downtimes, consumertypes.OutstandingDowntime{
ValidatorConsensusAddress: addr,
})
}

return downtimes
}

// SetCCValidator sets a cross-chain validator under its validator address
Expand Down Expand Up @@ -439,31 +451,3 @@ func (k Keeper) AppendPendingPacket(ctx sdk.Context, packet ...types.ConsumerPac
list := append(pending.GetList(), packet...)
k.SetPendingPackets(ctx, types.ConsumerPackets{List: list})
}

// GetHeightToValsetUpdateIDs returns all height to valset update id mappings in store
func (k Keeper) GetHeightToValsetUpdateIDs(ctx sdk.Context) []types.HeightToValsetUpdateID {
heightToVCIDs := []types.HeightToValsetUpdateID{}
k.IterateHeightToValsetUpdateID(ctx, func(height, vscID uint64) (stop bool) {
hv := types.HeightToValsetUpdateID{
Height: height,
ValsetUpdateId: vscID,
}
heightToVCIDs = append(heightToVCIDs, hv)
return false // do not stop iteration
})

return heightToVCIDs
}

// GetOutstandingDowntimes returns all outstanding downtimes in store
func (k Keeper) GetOutstandingDowntimes(ctx sdk.Context) []consumertypes.OutstandingDowntime {
outstandingDowntimes := []types.OutstandingDowntime{}
k.IterateOutstandingDowntime(ctx, func(addr string) bool {
od := types.OutstandingDowntime{
ValidatorConsensusAddress: addr,
}
outstandingDowntimes = append(outstandingDowntimes, od)
return false
})
return outstandingDowntimes
}
9 changes: 4 additions & 5 deletions x/ccv/consumer/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,12 @@ func TestPacketMaturityTime(t *testing.T) {
orderedTimes := [][]uint64{{1, 10}, {2, 25}, {5, 15}}
i := 0

consumerKeeper.IteratePacketMaturityTime(ctx, func(seq, time uint64) (stop bool) {
for _, maturingVSCPacket := range consumerKeeper.GetAllPacketMaturityTimes(ctx, nil) {
// require that we iterate through unbonding time in order of sequence
require.Equal(t, orderedTimes[i][0], seq)
require.Equal(t, orderedTimes[i][1], time)
require.Equal(t, orderedTimes[i][0], maturingVSCPacket.VscId)
require.Equal(t, orderedTimes[i][1], maturingVSCPacket.MaturityTime)
i++
return false // do not stop the iteration
})
}

// delete all vscs remaining in state
consumerKeeper.DeletePacketMaturityTimes(ctx, 1, 2, 5)
Expand Down
60 changes: 26 additions & 34 deletions x/ccv/consumer/keeper/relay.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package keeper

import (
"encoding/binary"
"fmt"
"strconv"

Expand Down Expand Up @@ -86,43 +85,36 @@ func (k Keeper) OnRecvVSCPacket(ctx sdk.Context, packet channeltypes.Packet, new
// operations that resulted in validator updates included in that VSC have matured on
// the consumer chain.
func (k Keeper) QueueVSCMaturedPackets(ctx sdk.Context) {
store := ctx.KVStore(k.storeKey)
maturityIterator := sdk.KVStorePrefixIterator(store, []byte{types.PacketMaturityTimeBytePrefix})
defer maturityIterator.Close()

currentTime := uint64(ctx.BlockTime().UnixNano())

shaspitz marked this conversation as resolved.
Show resolved Hide resolved
maturedVscIds := []uint64{}
for maturityIterator.Valid() {
vscId := types.IdFromPacketMaturityTimeKey(maturityIterator.Key())
if currentTime >= binary.BigEndian.Uint64(maturityIterator.Value()) {
// construct validator set change packet data
vscPacket := ccv.NewVSCMaturedPacketData(vscId)

// append VSCMatured packet to pending packets
// sending packets is attempted each EndBlock
// unsent packets remain in the queue until sent
k.AppendPendingPacket(ctx, types.ConsumerPacket{
Type: types.VscMaturedPacket,
Data: vscPacket.GetBytes(),
})

ctx.EventManager().EmitEvent(
sdk.NewEvent(
ccv.EventTypeVSCMatured,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
sdk.NewAttribute(ccv.AttributeChainID, ctx.ChainID()),
sdk.NewAttribute(ccv.AttributeConsumerHeight, strconv.Itoa(int(ctx.BlockHeight()))),
sdk.NewAttribute(ccv.AttributeValSetUpdateID, strconv.Itoa(int(vscId))),
sdk.NewAttribute(ccv.AttributeTimestamp, strconv.Itoa(int(currentTime))),
),
)

maturedVscIds = append(maturedVscIds, vscId)
} else {
break
for _, maturityTime := range k.GetAllPacketMaturityTimes(ctx, &currentTime) {
if currentTime < maturityTime.MaturityTime {
panic(fmt.Errorf("maturity time %d is greater than current time %d", maturityTime.MaturityTime, currentTime))
}
maturityIterator.Next()
// construct validator set change packet data
vscPacket := ccv.NewVSCMaturedPacketData(maturityTime.VscId)

// append VSCMatured packet to pending packets
// sending packets is attempted each EndBlock
// unsent packets remain in the queue until sent
k.AppendPendingPacket(ctx, types.ConsumerPacket{
Type: types.VscMaturedPacket,
Data: vscPacket.GetBytes(),
})

ctx.EventManager().EmitEvent(
sdk.NewEvent(
ccv.EventTypeVSCMatured,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
sdk.NewAttribute(ccv.AttributeChainID, ctx.ChainID()),
sdk.NewAttribute(ccv.AttributeConsumerHeight, strconv.Itoa(int(ctx.BlockHeight()))),
sdk.NewAttribute(ccv.AttributeValSetUpdateID, strconv.Itoa(int(maturityTime.VscId))),
sdk.NewAttribute(ccv.AttributeTimestamp, strconv.Itoa(int(currentTime))),
),
)

maturedVscIds = append(maturedVscIds, uint64(maturityTime.VscId))
}

k.DeletePacketMaturityTimes(ctx, maturedVscIds...)
Expand Down
Loading