Skip to content

Commit

Permalink
post merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsitrin committed Jan 14, 2025
1 parent 5f028e5 commit 57ad10a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion da/weave_vm/gateway/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (g *Gateway) RetrieveFromGateway(ctx context.Context, txHash string) (*weav
if err != nil {
return nil, fmt.Errorf("failed to call weaveVM-data-retriever: %w", err)
}
defer resp.Body.Close()
defer resp.Body.Close() // nolint:errcheck

body, err := io.ReadAll(resp.Body)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion da/weave_vm/signer/web3_signer_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (web3s *Web3SignerClient) doRequest(ctx context.Context, request *weaveVMty
if err != nil {
return nil, fmt.Errorf("failed to send request: %w", err)
}
defer resp.Body.Close()
defer resp.Body.Close() // nolint:errcheck

body, err := io.ReadAll(resp.Body)
if err != nil {
Expand Down
11 changes: 8 additions & 3 deletions da/weave_vm/wvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
weaveVMtypes "github.com/dymensionxyz/dymint/da/weave_vm/types"
"github.com/dymensionxyz/dymint/store"
"github.com/dymensionxyz/dymint/types"
"github.com/dymensionxyz/dymint/types/metrics"
pb "github.com/dymensionxyz/dymint/types/pb/dymint"
uretry "github.com/dymensionxyz/dymint/utils/retry"
"github.com/dymensionxyz/gerr-cosmos/gerrc"
Expand Down Expand Up @@ -143,7 +144,7 @@ func (c *DataAvailabilityLayerClient) Init(config []byte, pubsubServer *pubsub.S
for _, apply := range options {
apply(c)
}
types.RollappConsecutiveFailedDASubmission.Set(0)
metrics.RollappConsecutiveFailedDASubmission.Set(0)

// Initialize context
c.ctx, c.cancel = context.WithCancel(context.Background())
Expand Down Expand Up @@ -247,7 +248,7 @@ func (c *DataAvailabilityLayerClient) SubmitBatch(batch *types.Batch) da.ResultS

if err != nil {
c.logger.Error("Submit blob.", "error", err)
types.RollappConsecutiveFailedDASubmission.Inc()
metrics.RollappConsecutiveFailedDASubmission.Inc()
backoff.Sleep()
continue
}
Expand All @@ -262,7 +263,7 @@ func (c *DataAvailabilityLayerClient) SubmitBatch(batch *types.Batch) da.ResultS

c.logger.Debug("Submitted blob to DA successfully.")

types.RollappConsecutiveFailedDASubmission.Set(0)
metrics.RollappConsecutiveFailedDASubmission.Set(0)
return da.ResultSubmitBatch{
BaseResult: da.BaseResult{
Code: da.StatusSuccess,
Expand Down Expand Up @@ -596,3 +597,7 @@ func (c *DataAvailabilityLayerClient) verifyBlobData(commitment []byte, data []b
}
return nil
}

func (c *DataAvailabilityLayerClient) DAPath() string {
return fmt.Sprintf("%d", c.config.ChainID)
}

0 comments on commit 57ad10a

Please # to comment.