Skip to content

Commit

Permalink
address from comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Jul 22, 2024
1 parent 9f2a418 commit 85eef7c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 23 deletions.
3 changes: 2 additions & 1 deletion proto/zetachain/zetacore/observer/chain_nonces.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ message ChainNonces {
string creator = 1;

// deprecated(v19): index has been replaced by chain_id for unique identifier
string index = 2 [deprecated = true];;
string index = 2 [ deprecated = true ];
;

int64 chain_id = 3;
uint64 nonce = 4;
Expand Down
3 changes: 2 additions & 1 deletion typescript/zetachain/zetacore/observer/chain_nonces_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export declare class ChainNonces extends Message<ChainNonces> {
/**
* deprecated(v19): index has been replaced by chain_id for unique identifier
*
* @generated from field: string index = 2;
* @generated from field: string index = 2 [deprecated = true];
* @deprecated
*/
index: string;

Expand Down
4 changes: 2 additions & 2 deletions x/observer/migrations/v8/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ func TestMigrateStore(t *testing.T) {
allChainNonces = k.GetAllChainNonces(ctx)
require.Len(t, allChainNonces, 10)

chainIDMap := make(map[int64]bool)
chainIDMap := make(map[int64]struct{})

// all chain nonces can be found in the store
for _, chainNonces := range allChainNonces {
// chain all chain IDs are different
_, found := chainIDMap[chainNonces.ChainId]
require.False(t, found)
chainIDMap[chainNonces.ChainId] = true
chainIDMap[chainNonces.ChainId] = struct{}{}

// check value
retrievedChainNonces, found := k.GetChainNonces(ctx, chainNonces.ChainId)
Expand Down
39 changes: 20 additions & 19 deletions x/observer/types/chain_nonces.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 85eef7c

Please sign in to comment.