Skip to content

Commit

Permalink
ref(oracle)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonz789 committed May 29, 2024
1 parent 7a6701d commit 1c87ab9
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions x/oracle/keeper/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,50 +21,3 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
bz := k.cdc.MustMarshal(&params)
store.Set(types.ParamsKey, bz)
}

//func (k Keeper) SetUpdateParams(ctx sdk.Context, params types.Params) {
// // validation has been done, keeper just update params
// p := k.GetParams(ctx)
//
// // update chains
// for _, c := range params.Chains {
// p.Chains = append(p.Chains, c)
// }
//
// // update tokens
// for _, t := range params.Tokens {
// p.Tokens = append(p.Tokens, t)
// }
//
// // update sources
// for _, s := range params.Sources {
// if !s.Valid {
// sID := p.GetSourceIDByName(s.Name)
// p.Sources[sID].Valid = s.Valid
// } else {
// p.Sources = append(p.Sources, s)
// }
// }
//
// // update rules
// for _, r := range params.Rules {
// p.Rules = append(p.Rules, r)
// }
//
// //update tokenFeeder
// for _, f := range params.TokenFeeders {
// if fID := p.GetFeederIDsByTokenID(f.TokenID); fID > 0 {
// feeder := p.TokenFeeders[fID]
// // all fiels has been verified before update params, just set all values
// if f.StartBaseBlock > 0 {
// feeder.StartBaseBlock = f.StartBaseBlock
// }
// if f.EndBlock > 0 {
// feeder.EndBlock = f.EndBlock
// }
// } else {
// p.TokenFeeders = append(p.TokenFeeders, f)
// }
// }
// k.SetParams(ctx, p)
//}

0 comments on commit 1c87ab9

Please sign in to comment.