From ab1378d744ec1d57a01e1c611548e90d84dd7358 Mon Sep 17 00:00:00 2001 From: tbjump Date: Wed, 3 May 2023 22:33:41 +0000 Subject: [PATCH] node/watchers/sui: fix linter warnings --- node/pkg/watchers/sui/watcher.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/node/pkg/watchers/sui/watcher.go b/node/pkg/watchers/sui/watcher.go index 6b0f6d528..934cc4e91 100644 --- a/node/pkg/watchers/sui/watcher.go +++ b/node/pkg/watchers/sui/watcher.go @@ -239,7 +239,7 @@ func (e *Watcher) inspectBody(logger *zap.Logger, body SuiResult) error { EmitterChain: vaa.ChainIDSui, EmitterAddress: emitter, Payload: fields.Payload, - ConsistencyLevel: uint8(*fields.ConsistencyLevel), + ConsistencyLevel: *fields.ConsistencyLevel, } suiMessagesConfirmed.Inc() @@ -373,7 +373,7 @@ func (e *Watcher) Run(ctx context.Context) error { return ctx.Err() case <-timer.C: - resp, err := http.Post(e.suiRPC, "application/json", strings.NewReader(`{"jsonrpc":"2.0", "id": 1, "method": "sui_getLatestCheckpointSequenceNumber", "params": []}`)) + resp, err := http.Post(e.suiRPC, "application/json", strings.NewReader(`{"jsonrpc":"2.0", "id": 1, "method": "sui_getLatestCheckpointSequenceNumber", "params": []}`)) //nolint:noctx // TODO FIXME we should propagate context with Deadline here. if err != nil { logger.Error("sui_getLatestCheckpointSequenceNumber failed", zap.Error(err)) p2p.DefaultRegistry.AddErrorCount(vaa.ChainIDSui, 1) @@ -404,7 +404,7 @@ func (e *Watcher) Run(ctx context.Context) error { logger.Debug("sui_getLatestCheckpointSequenceNumber", zap.String("result", res.Result)) p2p.DefaultRegistry.SetNetworkStats(vaa.ChainIDSui, &gossipv1.Heartbeat_Network{ - Height: int64(height), + Height: height, ContractAddress: e.suiMoveEventType, }) } @@ -429,7 +429,7 @@ func (e *Watcher) Run(ctx context.Context) error { buf := fmt.Sprintf(`{"jsonrpc":"2.0", "id": 1, "method": "sui_getEvents", "params": ["%s"]}`, tx58) - resp, err := http.Post(e.suiRPC, "application/json", strings.NewReader(buf)) + resp, err := http.Post(e.suiRPC, "application/json", strings.NewReader(buf)) //nolint:noctx // TODO FIXME we should propagate context with Deadline here. if err != nil { logger.Error("getEvents API failed", zap.String("suiRPC", e.suiRPC), zap.Error(err)) p2p.DefaultRegistry.AddErrorCount(vaa.ChainIDSui, 1)