Skip to content

Commit ad752ad

Browse files
authored
Merge branch 'main' into cre-1320
2 parents ee5eb08 + e057cb4 commit ad752ad

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

pkg/types/llo/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ type ChannelDefinition struct {
272272
// It is set by the LLO channel definitions cache.
273273
// The source is the id of the role that added the channel definition (i.e. the channel adder)
274274
// 1 is always the ChannelConfigStore owner, greater values are adders.
275-
Source uint32 `json:"-"`
275+
Source uint32 `json:"source"`
276276
// Tombstone indicates if the channel definition is an owner tombstone that
277277
// should be removed from the current channel definitions cache.
278278
Tombstone bool `json:"tombstone"`

pkg/types/llo/types_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ func Test_ChannelDefinitions_Serialization(t *testing.T) {
1818
{"streamId": 2, "aggregator": "mode"}
1919
],
2020
"opts": null,
21-
"tombstone": false
21+
"tombstone": false,
22+
"source": 1
2223
},
2324
"1": {
2425
"reportFormat": "evm_premium_legacy",
@@ -33,7 +34,8 @@ func Test_ChannelDefinitions_Serialization(t *testing.T) {
3334
"feedId": "0x0003aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3435
"baseUSDFee": "0.1"
3536
},
36-
"tombstone": false
37+
"tombstone": false,
38+
"source": 2
3739
}
3840
}`
3941
var channelDefinitions ChannelDefinitions
@@ -160,11 +162,13 @@ func Test_ChannelDefinitions_Value(t *testing.T) {
160162
ReportFormat: ReportFormatJSON,
161163
Streams: []Stream{{1, AggregatorMedian}, {2, AggregatorMode}},
162164
Opts: nil,
165+
Source: 1,
163166
},
164167
1: {
165168
ReportFormat: ReportFormatEVMPremiumLegacy,
166169
Streams: []Stream{{1, AggregatorMedian}, {2, AggregatorMedian}, {3, AggregatorQuote}},
167170
Opts: []byte(`{"baseUSDFee":"0.1","expirationWindow":86400,"feedId":"0x0003aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","multiplier":"1000000000000000000"}`),
171+
Source: 2,
168172
},
169173
}
170174
v, err := c.Value()
@@ -177,7 +181,8 @@ func Test_ChannelDefinitions_Value(t *testing.T) {
177181
{"streamId": 2, "aggregator": "mode"}
178182
],
179183
"opts": null,
180-
"tombstone": false
184+
"tombstone": false,
185+
"source": 1
181186
},
182187
"1": {
183188
"reportFormat": "evm_premium_legacy",
@@ -192,7 +197,8 @@ func Test_ChannelDefinitions_Value(t *testing.T) {
192197
"feedId": "0x0003aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
193198
"multiplier": "1000000000000000000"
194199
},
195-
"tombstone": false
200+
"tombstone": false,
201+
"source": 2
196202
}
197203
}`
198204
assert.JSONEq(t, expectedJSON, string(v.([]byte)))

0 commit comments

Comments
 (0)