From b5f1622129cba472d95672f5c9b461d2b322f7a3 Mon Sep 17 00:00:00 2001 From: tbjump Date: Wed, 3 May 2023 22:29:00 +0000 Subject: [PATCH] node/watchers/algorand: fix linter warnings --- node/pkg/watchers/algorand/watcher.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/node/pkg/watchers/algorand/watcher.go b/node/pkg/watchers/algorand/watcher.go index b88d31e74..0c19ce477 100644 --- a/node/pkg/watchers/algorand/watcher.go +++ b/node/pkg/watchers/algorand/watcher.go @@ -118,7 +118,7 @@ func lookAtTxn(e *Watcher, t types.SignedTxnInBlock, b types.Block, logger *zap. observation := &common.MessagePublication{ TxHash: txHash, - Timestamp: time.Unix(int64(b.TimeStamp), 0), + Timestamp: time.Unix(b.TimeStamp, 0), Nonce: uint32(binary.BigEndian.Uint64(at.ApplicationArgs[2])), Sequence: binary.BigEndian.Uint64([]byte(ed.Logs[0])), EmitterChain: vaa.ChainIDAlgorand, @@ -171,7 +171,7 @@ func (e *Watcher) Run(ctx context.Context) error { return err } - status, err := algodClient.StatusAfterBlock(0).Do(context.Background()) + status, err := algodClient.StatusAfterBlock(0).Do(ctx) if err != nil { logger.Error("StatusAfterBlock", zap.Error(err)) p2p.DefaultRegistry.AddErrorCount(vaa.ChainIDAlgorand, 1) @@ -195,7 +195,7 @@ func (e *Watcher) Run(ctx context.Context) error { zap.String("tx_hash", hex.EncodeToString(r.TxHash)), zap.String("base32_tx_hash", base32.StdEncoding.WithPadding(base32.NoPadding).EncodeToString(r.TxHash))) - result, err := indexerClient.SearchForTransactions().TXID(base32.StdEncoding.WithPadding(base32.NoPadding).EncodeToString(r.TxHash)).Do(context.Background()) + result, err := indexerClient.SearchForTransactions().TXID(base32.StdEncoding.WithPadding(base32.NoPadding).EncodeToString(r.TxHash)).Do(ctx) if err != nil { logger.Error("SearchForTransactions", zap.Error(err)) p2p.DefaultRegistry.AddErrorCount(vaa.ChainIDAlgorand, 1) @@ -204,7 +204,7 @@ func (e *Watcher) Run(ctx context.Context) error { for _, t := range result.Transactions { r := t.ConfirmedRound - block, err := algodClient.Block(r).Do(context.Background()) + block, err := algodClient.Block(r).Do(ctx) if err != nil { logger.Error("SearchForTransactions", zap.Error(err)) p2p.DefaultRegistry.AddErrorCount(vaa.ChainIDAlgorand, 1)