diff --git a/dataavailability/nubit/backend.go b/dataavailability/nubit/backend.go index bd8b6e1349..56561a1a8c 100644 --- a/dataavailability/nubit/backend.go +++ b/dataavailability/nubit/backend.go @@ -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) diff --git a/dataavailability/nubit/config.go b/dataavailability/nubit/config.go index 8230c23b89..81d5dde04a 100644 --- a/dataavailability/nubit/config.go +++ b/dataavailability/nubit/config.go @@ -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 @@ -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"` }