Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/chains/solana/proto_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1419,15 +1419,15 @@ func ConvertValueComparatorsToProto(comparators []solprimitives.IndexedValueComp
return nil
}

out := make([]*IndexedValueComparator, len(comparators))
out := make([]*IndexedValueComparator, 0, len(comparators))
for _, c := range comparators {
out = append(out, &IndexedValueComparator{
Value: c.Value,
Operator: chaincommonpb.ComparisonOperator(c.Operator),
})
}

return nil
return out
}

func ConvertValueCompraratorsFromProto(comparators []*IndexedValueComparator) []solprimitives.IndexedValueComparator {
Expand Down
10 changes: 5 additions & 5 deletions pkg/chains/solana/proto_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,17 +291,17 @@ func TestExpressions_Roundtrip_SolanaPrimitives(t *testing.T) {
{Value: typesolana.IndexedValue{1, 2, 3}, Operator: 0},
})

root := query.Or(query.And(a, e), evBy)

expressions := []query.Expression{a, e, evBy}
// to proto
pb, err := conv.ConvertExpressionsToProto([]query.Expression{root})
pb, err := conv.ConvertExpressionsToProto(expressions)
require.NoError(t, err)
require.Len(t, pb, 1)
require.Len(t, pb, 3)

// from proto
round, err := conv.ConvertExpressionsFromProto(pb)
require.NoError(t, err)
require.Len(t, round, 1)
require.Len(t, round, 3)
require.Equal(t, expressions, round)
}

func TestLPFilterAndSubkeysConverters(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions pkg/settings/cresettings/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"ChainAllowed": {
"Default": "false",
"Values": {
"12463857294658392847": "true",
"12922642891491394802": "true",
"3379446385462418246": "true"
}
Expand Down
1 change: 1 addition & 0 deletions pkg/settings/cresettings/defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ LogEventLimit = '1000'
Default = 'false'

[PerWorkflow.ChainAllowed.Values]
12463857294658392847 = 'true'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add mainnet right away?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left main nets out here by design so that we don't accidentally enable anything prematurely. Originally I had this empty, but added minimal dev/testnets to support testing in CI.

12922642891491394802 = 'true'
3379446385462418246 = 'true'

Expand Down
6 changes: 4 additions & 2 deletions pkg/settings/cresettings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ var Default = Schema{
LogLineLimit: Size(config.KByte),
LogEventLimit: Int(1_000),
ChainAllowed: PerChainSelector(Bool(false), map[string]bool{
// geth-testnet
"3379446385462418246": true,
// geth-devnet2
"12922642891491394802": true,
// geth-testnet
"3379446385462418246": true,
// solana-testnet
"12463857294658392847": true,
}),

CRONTrigger: cronTrigger{
Expand Down
Loading