Skip to content

Commit

Permalink
Fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
sieniven committed Jul 30, 2024
1 parent 909172b commit cffd2a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dataavailability/nubit/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (backend *NubitDABackend) PostSequence(ctx context.Context, batchesData [][

// Retries
tries += 1
time.Sleep(backend.config.NubitGetProofWaitPeriod)
time.Sleep(backend.config.NubitGetProofWaitPeriod.Duration)
}
if !posted {
log.Errorf("Get blob proof on Nubit DA failed: %s", err)
Expand Down
16 changes: 10 additions & 6 deletions dataavailability/nubit/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package nubit

import "time"
import (
"time"

"github.com/0xPolygonHermez/zkevm-node/config/types"
)

// NubitNamespaceBytesLength is the fixed-size bytes array.
const NubitNamespaceBytesLength = 58
Expand All @@ -10,9 +14,9 @@ const NubitMinCommitTime time.Duration = 12 * time.Second

// Config is the NubitDA backend configurations
type Config struct {
NubitRpcURL string `mapstructure:"NubitRpcURL"`
NubitAuthKey string `mapstructure:"NubitAuthKey"`
NubitNamespace string `mapstructure:"NubitNamespace"`
NubitGetProofMaxRetry uint64 `mapstructure:"NubitGetProofMaxRetry"`
NubitGetProofWaitPeriod time.Duration `mapstructure:"NubitGetProofWaitPeriod"`
NubitRpcURL string `mapstructure:"NubitRpcURL"`
NubitAuthKey string `mapstructure:"NubitAuthKey"`
NubitNamespace string `mapstructure:"NubitNamespace"`
NubitGetProofMaxRetry uint64 `mapstructure:"NubitGetProofMaxRetry"`
NubitGetProofWaitPeriod types.Duration `mapstructure:"NubitGetProofWaitPeriod"`
}

0 comments on commit cffd2a5

Please sign in to comment.