Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/claimer new algorithm #610

Open
wants to merge 4 commits into
base: feature/new-build
Choose a base branch
from
Open
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
11 changes: 6 additions & 5 deletions cmd/cartesi-rollups-evm-reader/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"github.com/cartesi/rollups-node/internal/config"
cfg "github.com/cartesi/rollups-node/internal/evmreader/config"
"github.com/cartesi/rollups-node/internal/evmreader/service"
"github.com/cartesi/rollups-node/internal/repository"
"github.com/cartesi/rollups-node/internal/services/startup"
Expand Down Expand Up @@ -97,7 +98,7 @@ func run(cmd *cobra.Command, args []string) {
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer stop()

c := config.FromEnv()
c := cfg.GetEVMReaderConfig()

// Override configs
if verbose {
Expand All @@ -115,7 +116,7 @@ func run(cmd *cobra.Command, args []string) {
if defaultBlock != "" {
evmReaderDefaultBlock, err := config.ToDefaultBlockFromString(defaultBlock)
cobra.CheckErr(err)
c.EvmReaderDefaultBlock = evmReaderDefaultBlock
c.DefaultBlock = evmReaderDefaultBlock
}

// setup log
Expand All @@ -130,7 +131,7 @@ func run(cmd *cobra.Command, args []string) {
}
defer database.Close()

_, err = startup.SetupNodePersistentConfig(ctx, database, c)
_, err = startup.SetupNodePersistentConfig(ctx, database, c.ToNodeConfig())
if err != nil {
slog.Error("EVM Reader couldn't connect to the database", "error", err)
os.Exit(1)
Expand All @@ -141,8 +142,8 @@ func run(cmd *cobra.Command, args []string) {
c.BlockchainHttpEndpoint.Value,
c.BlockchainWsEndpoint.Value,
database,
c.EvmReaderRetryPolicyMaxRetries,
c.EvmReaderRetryPolicyMaxDelay,
c.RetryPolicyMaxRetries,
c.RetryPolicyMaxDelay,
)

// logs startup time
Expand Down
Loading
Loading