Skip to content

Commit

Permalink
address merge conflicts to get merge building, instantiate defaultgen…
Browse files Browse the repository at this point in the history
…esis properly
  • Loading branch information
riley-stride committed Jun 27, 2022
1 parent cec9fc9 commit 741d674
Show file tree
Hide file tree
Showing 25 changed files with 103 additions and 3,107 deletions.
26 changes: 0 additions & 26 deletions proto/records/deposit_record.proto

This file was deleted.

18 changes: 0 additions & 18 deletions proto/records/epoch_unbonding_record.proto

This file was deleted.

6 changes: 1 addition & 5 deletions proto/records/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ syntax = "proto3";
package Stridelabs.stride.records;

import "gogoproto/gogo.proto";
// import "records/params.proto";
// import "records/user_redemption_record.proto";
// import "records/epoch_unbonding_record.proto";
// import "records/deposit_record.proto";
// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/Stride-Labs/stride/x/records/types";
Expand Down Expand Up @@ -96,7 +92,7 @@ message GenesisState {
string port_id = 2;
repeated UserRedemptionRecord userRedemptionRecordList = 3 [(gogoproto.nullable) = false];
uint64 userRedemptionRecordCount = 4;
repeated hostZoneUnbonding epochUnbondingRecordList = 5 [(gogoproto.nullable) = false];
repeated EpochUnbondingRecord epochUnbondingRecordList = 5 [(gogoproto.nullable) = false];
uint64 epochUnbondingRecordCount = 6;
repeated DepositRecord depositRecordList = 7 [(gogoproto.nullable) = false];
uint64 depositRecordCount = 8;
Expand Down
18 changes: 0 additions & 18 deletions proto/records/packet.proto

This file was deleted.

12 changes: 0 additions & 12 deletions proto/records/params.proto

This file was deleted.

13 changes: 0 additions & 13 deletions proto/records/tx.proto

This file was deleted.

16 changes: 0 additions & 16 deletions proto/records/user_redemption_record.proto

This file was deleted.

10 changes: 5 additions & 5 deletions x/records/keeper/epoch_unbonding_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (k Keeper) AppendEpochUnbondingRecord(
epochUnbondingRecord.Id = count

store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochUnbondingRecordKey))
appendedValue := k.cdc.MustMarshal(&epochUnbondingRecord)
appendedValue := k.Cdc.MustMarshal(&epochUnbondingRecord)
store.Set(GetEpochUnbondingRecordIDBytes(epochUnbondingRecord.Id), appendedValue)

// Update epochUnbondingRecord count
Expand All @@ -56,7 +56,7 @@ func (k Keeper) AppendEpochUnbondingRecord(
// SetEpochUnbondingRecord set a specific epochUnbondingRecord in the store
func (k Keeper) SetEpochUnbondingRecord(ctx sdk.Context, epochUnbondingRecord types.EpochUnbondingRecord) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochUnbondingRecordKey))
b := k.cdc.MustMarshal(&epochUnbondingRecord)
b := k.Cdc.MustMarshal(&epochUnbondingRecord)
store.Set(GetEpochUnbondingRecordIDBytes(epochUnbondingRecord.Id), b)
}

Expand All @@ -67,7 +67,7 @@ func (k Keeper) GetEpochUnbondingRecord(ctx sdk.Context, id uint64) (val types.E
if b == nil {
return val, false
}
k.cdc.MustUnmarshal(b, &val)
k.Cdc.MustUnmarshal(b, &val)
return val, true
}

Expand Down Expand Up @@ -108,7 +108,7 @@ func (k Keeper) GetAllEpochUnbondingRecord(ctx sdk.Context) (list []types.EpochU

for ; iterator.Valid(); iterator.Next() {
var val types.EpochUnbondingRecord
k.cdc.MustUnmarshal(iterator.Value(), &val)
k.Cdc.MustUnmarshal(iterator.Value(), &val)
list = append(list, val)
}

Expand Down Expand Up @@ -139,7 +139,7 @@ func (k Keeper) IterateEpochUnbondingRecords(ctx sdk.Context,

for ; iterator.Valid(); iterator.Next() {
epochUnbondRecord := types.EpochUnbondingRecord{}
k.cdc.MustUnmarshal(iterator.Value(), &epochUnbondRecord)
k.Cdc.MustUnmarshal(iterator.Value(), &epochUnbondRecord)

stop := fn(i, epochUnbondRecord)

Expand Down
2 changes: 1 addition & 1 deletion x/records/keeper/grpc_query_epoch_unbonding_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (k Keeper) EpochUnbondingRecordAll(c context.Context, req *types.QueryAllEp

pageRes, err := query.Paginate(epochUnbondingRecordStore, req.Pagination, func(key []byte, value []byte) error {
var epochUnbondingRecord types.EpochUnbondingRecord
if err := k.cdc.Unmarshal(value, &epochUnbondingRecord); err != nil {
if err := k.Cdc.Unmarshal(value, &epochUnbondingRecord); err != nil {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion x/records/keeper/grpc_query_user_redemption_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (k Keeper) UserRedemptionRecordAll(c context.Context, req *types.QueryAllUs

pageRes, err := query.Paginate(userRedemptionRecordStore, req.Pagination, func(key []byte, value []byte) error {
var userRedemptionRecord types.UserRedemptionRecord
if err := k.cdc.Unmarshal(value, &userRedemptionRecord); err != nil {
if err := k.Cdc.Unmarshal(value, &userRedemptionRecord); err != nil {
return err
}

Expand Down
8 changes: 4 additions & 4 deletions x/records/keeper/user_redemption_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// SetUserRedemptionRecord set a specific userRedemptionRecord in the store
func (k Keeper) SetUserRedemptionRecord(ctx sdk.Context, userRedemptionRecord types.UserRedemptionRecord) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.UserRedemptionRecordKey))
b := k.cdc.MustMarshal(&userRedemptionRecord)
b := k.Cdc.MustMarshal(&userRedemptionRecord)
store.Set([]byte(userRedemptionRecord.Id), b)
}

Expand All @@ -20,7 +20,7 @@ func (k Keeper) GetUserRedemptionRecord(ctx sdk.Context, id string) (val types.U
if b == nil {
return val, false
}
k.cdc.MustUnmarshal(b, &val)
k.Cdc.MustUnmarshal(b, &val)
return val, true
}

Expand All @@ -39,7 +39,7 @@ func (k Keeper) GetAllUserRedemptionRecord(ctx sdk.Context) (list []types.UserRe

for ; iterator.Valid(); iterator.Next() {
var val types.UserRedemptionRecord
k.cdc.MustUnmarshal(iterator.Value(), &val)
k.Cdc.MustUnmarshal(iterator.Value(), &val)
list = append(list, val)
}

Expand All @@ -58,7 +58,7 @@ func (k Keeper) IterateUserRedemptionRecords(ctx sdk.Context,

for ; iterator.Valid(); iterator.Next() {
userRedRecord := types.UserRedemptionRecord{}
k.cdc.MustUnmarshal(iterator.Value(), &userRedRecord)
k.Cdc.MustUnmarshal(iterator.Value(), &userRedRecord)

stop := fn(i, userRedRecord)

Expand Down
Loading

0 comments on commit 741d674

Please sign in to comment.