Skip to content

Commit

Permalink
text(oracle-proto): proto lint, RuleWithSource->RuleSource
Browse files Browse the repository at this point in the history
  • Loading branch information
leonz789 committed Apr 18, 2024
1 parent ecfda24 commit dfb42a4
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 71 deletions.
2 changes: 1 addition & 1 deletion proto/exocore/oracle/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ message Params {
// sources info from where the price data would be fetched
repeated Source sources = 3;
// rules specified on how to decide the provided price source to be accept
repeated RuleWithSource rules = 4;
repeated RuleSource rules = 4;
// each tokenFeeder represents an active token whose price being updated
repeated TokenFeeder token_feeders = 5;
}
2 changes: 1 addition & 1 deletion proto/exocore/oracle/token_feeder.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ message NOMSource{
//specify data from which source is needed
//rule_1: specified sources
//rule_2: n out of total sources are required
message RuleWithSource{
message RuleSource{
//refer to params.sourceList.ID, when length>0, ignore the other field, when 1st set to 0, means all valid sources,
// length==0->check next field:minimum
repeated uint64 source_ids = 1 [(gogoproto.customname) = "SourceIDs"];
Expand Down
2 changes: 1 addition & 1 deletion x/oracle/keeper/aggregator/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ var defaultParams = types.Params{
Chains: []*types.Chain{{Name: "-", Desc: "-"}, {Name: "Ethereum", Desc: "-"}},
Tokens: []*types.Token{{}, {Name: "eth", ChainID: 1, ContractAddress: "0xabc", Decimal: 18, Active: true}},
Sources: []*types.Source{{}, {Name: "chainLink", Entry: &types.Endpoint{}, Valid: true, Deterministic: true}},
Rules: []*types.RuleWithSource{{}, {SourceIDs: []uint64{1}}},
Rules: []*types.RuleSource{{}, {SourceIDs: []uint64{1}}},
TokenFeeders: []*types.TokenFeeder{{}, {TokenID: 1, RuleID: 1, StartRoundID: 1, StartBaseBlock: 0, Interval: 10, EndBlock: 0}},
}
2 changes: 1 addition & 1 deletion x/oracle/keeper/cache/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var defaultParams = types.Params{
Chains: []*types.Chain{{Name: "-", Desc: "-"}, {Name: "Ethereum", Desc: "-"}},
Tokens: []*types.Token{{}, {Name: "eth", ChainID: 1, ContractAddress: "0xabc", Decimal: 18, Active: true}},
Sources: []*types.Source{{}, {Name: "chainLink", Entry: &types.Endpoint{}, Valid: true, Deterministic: true}},
Rules: []*types.RuleWithSource{{}, {SourceIDs: []uint64{1}}},
Rules: []*types.RuleSource{{}, {SourceIDs: []uint64{1}}},
TokenFeeders: []*types.TokenFeeder{{}, {TokenID: 1, RuleID: 1, StartRoundID: 1, StartBaseBlock: 0, Interval: 10, EndBlock: 0}},
}
2 changes: 1 addition & 1 deletion x/oracle/keeper/testdata/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ var DefaultParams = types.Params{
Chains: []*types.Chain{{Name: "-", Desc: "-"}, {Name: "Ethereum", Desc: "-"}},
Tokens: []*types.Token{{}, {Name: "eth", ChainID: 1, ContractAddress: "0xabc", Decimal: 18, Active: true}},
Sources: []*types.Source{{}, {Name: "chainLink", Entry: &types.Endpoint{}, Valid: true, Deterministic: true}},
Rules: []*types.RuleWithSource{{}, {SourceIDs: []uint64{1}}},
Rules: []*types.RuleSource{{}, {SourceIDs: []uint64{1}}},
TokenFeeders: []*types.TokenFeeder{{}, {TokenID: 1, RuleID: 1, StartRoundID: 1, StartBaseBlock: 0, Interval: 10, EndBlock: 0}},
}
2 changes: 1 addition & 1 deletion x/oracle/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func DefaultParams() Params {
Deterministic: true,
},
},
Rules: []*RuleWithSource{
Rules: []*RuleSource{
// 0 is reserved
{},
{
Expand Down
28 changes: 14 additions & 14 deletions x/oracle/types/params.pb.go

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

101 changes: 50 additions & 51 deletions x/oracle/types/token_feeder.pb.go

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

0 comments on commit dfb42a4

Please sign in to comment.