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

add key assignment CRUD operations unit tests #516

Merged
merged 7 commits into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions testutil/crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ type CryptoIdentity struct {
ibcmock.PV
}

func NewCryptoIdentityFromBytesSeed(seed []byte) CryptoIdentity {
func NewCryptoIdentityFromBytesSeed(seed []byte) *CryptoIdentity {
//lint:ignore SA1019 We don't care because this is only a test.
privKey := ibcmock.PV{PrivKey: &sdkcryptokeys.PrivKey{Key: cryptoEd25519.NewKeyFromSeed(seed)}}
return CryptoIdentity{PV: privKey}
return &CryptoIdentity{PV: privKey}
}

func NewCryptoIdentityFromIntSeed(i int) CryptoIdentity {
func NewCryptoIdentityFromIntSeed(i int) *CryptoIdentity {
iUint64 := uint64(i)
seed := []byte("AAAAAAAAabcdefghijklmnopqrstuvwx") // 8+24 bytes
binary.LittleEndian.PutUint64(seed[:8], iUint64)
Expand Down
1 change: 1 addition & 0 deletions x/ccv/provider/keeper/key_assignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func (k Keeper) IterateValidatorsByConsumerAddr(
}
}

// IterateAllValidatorsByConsumerAddr iterates over all the mappings from consensus addresses on any consumer chain to consensus addresses on the provider chain
func (k Keeper) IterateAllValidatorsByConsumerAddr(
ctx sdk.Context,
cb func(chainID string, consumerAddr sdk.ConsAddress, providerAddr sdk.ConsAddress) (stop bool),
Expand Down
Loading