Skip to content

Commit

Permalink
fix: refactor to make linter happy with EigenDAConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Aug 9, 2024
1 parent 5b37117 commit e80e17b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ jobs:
- name: Build all lint dependencies
run: make -j build-node-deps

# - name: Lint
# uses: golangci/golangci-lint-action@v3
# with:
# version: latest
# skip-pkg-cache: true
# - name: Custom Lint
# run: |
# go run ./linters ./...
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
skip-pkg-cache: true
- name: Custom Lint
run: |
go run ./linters ./...
- name: Set environment variables
run: |
Expand Down
4 changes: 2 additions & 2 deletions arbnode/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ func createNodeImpl(
return nil, errors.New("a data availability service is required for this chain, but it was not configured")
} else if config.EigenDA.Enable {
log.Info("EigenDA enabled")
eigenDAService, err := eigenda.NewEigenDA(config.EigenDA.Rpc)
eigenDAService, err := eigenda.NewEigenDA(&config.EigenDA)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -702,7 +702,7 @@ func createNodeImpl(
if daWriter != nil {
dapWriter = daprovider.NewWriterForDAS(daWriter)
}

batchPoster, err = NewBatchPoster(ctx, &BatchPosterOpts{
DataPosterDB: rawdb.NewTable(arbDb, storage.BatchPosterPrefix),
L1Reader: l1Reader,
Expand Down
8 changes: 5 additions & 3 deletions eigenda/eigenda.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const (
MaxBatchSize = 2_000_000 // 2MB
)


func IsEigenDAMessageHeaderByte(header byte) bool {
return hasBits(header, daprovider.EigenDAMessageHeaderFlag)
}
Expand Down Expand Up @@ -44,8 +43,11 @@ type EigenDA struct {
client *EigenDAProxyClient
}

func NewEigenDA(proxyServerRpc string) (*EigenDA, error) {
client := NewEigenDAProxyClient(proxyServerRpc)
func NewEigenDA(config *EigenDAConfig) (*EigenDA, error) {
if !config.Enable {
panic("EigenDA is not enabled")
}
client := NewEigenDAProxyClient(config.Rpc)

return &EigenDA{
client: client,
Expand Down

0 comments on commit e80e17b

Please sign in to comment.