Skip to content

Commit

Permalink
fix starting block delay
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaidashenko committed Feb 10, 2025
1 parent 1487f8f commit 0b7c50c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion integration-tests/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Common struct {
TestConfig *tc.TestConfig
TestEnvDetails *TestEnvDetails
ClConfig map[string]interface{}
EnvVariables map[string]interface{}
EnvVariables map[string]string
Env *environment.Environment
DockerEnv *SolCLClusterTestEnv
AccountDetails *AccountDetails
Expand Down
9 changes: 4 additions & 5 deletions integration-tests/soak/log_poller_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package soak

import (
"os"
"testing"

"github.com/stretchr/testify/require"
Expand All @@ -16,10 +15,10 @@ func TestLogPollerPerformance(t *testing.T) {
if err != nil {
t.Fatal(err)
}
config.EnvVariables = map[string]interface{}{
"LOG_POLLER_TEST": os.Getenv("LOG_POLLER_TEST"), // MIMIC|MOCKER_RATE
"SOURCE_CONTRACT_ADDRESS": "", // only required for MIMIC test
"EVENTS_PER_SEC": "10", // only used by MOCKED_RATE
config.EnvVariables = map[string]string{
"LOG_POLLER_TEST": "MOCKER_RATE", // MIMIC|MOCKER_RATE
"SOURCE_CONTRACT_ADDRESS": "", // only required for MIMIC test
"EVENTS_PER_SEC": "10", // only used by MOCKED_RATE
}
name := "lp-mimic-performance"
state, err := common.NewOCRv2State(t, 1, name, &config)
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type TestConfig struct {
OCR2 *ocr2_config.Config `toml:"OCR2"`
SolanaConfig *SolanaConfig `toml:"SolanaConfig"`
ConfigurationName string `toml:"-"`
EnvVariables map[string]interface{} `toml:"-"`
EnvVariables map[string]string `toml:"-"`

// getter funcs for passing parameters
GetChainID func() string
Expand Down
2 changes: 1 addition & 1 deletion pkg/solana/logpoller/log_poller_mimic_contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func tryRegisterCCIPMessageSentFilter(ctx context.Context, lp *Service) error {
return fmt.Errorf("failed to get latest slot: %w", err)
}

startingBlock := slot - 500 // 8 hours delay
startingBlock := slot - 72000 // 8 hours delay
version := client.MaxSupportTransactionVersion
block, err := lp.client.GetBlockWithOpts(ctx, startingBlock, &rpc.GetBlockOpts{MaxSupportedTransactionVersion: &version})
if err != nil {
Expand Down

0 comments on commit 0b7c50c

Please sign in to comment.