From 1c87ab9af91bf1e2ca7e85ecad523e578b590a7b Mon Sep 17 00:00:00 2001 From: leonz789 Date: Mon, 27 May 2024 10:25:41 +0800 Subject: [PATCH] ref(oracle) --- x/oracle/keeper/params.go | 47 --------------------------------------- 1 file changed, 47 deletions(-) diff --git a/x/oracle/keeper/params.go b/x/oracle/keeper/params.go index 996e5f733..5dcd5402f 100644 --- a/x/oracle/keeper/params.go +++ b/x/oracle/keeper/params.go @@ -21,50 +21,3 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { bz := k.cdc.MustMarshal(¶ms) 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) -//}