From 6c02299f2bc1ffde8c102a214a6b394b0c8071b7 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 29 Jan 2022 02:16:17 +0100 Subject: [PATCH] node/pkg/solana: skip failed transactions Avoid unnecessary RPC calls/retries. Makes no difference for safety, which relies on VAA accounts rather than any transaction metadata. commit-id:0cd82ed4 --- node/pkg/solana/client.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/node/pkg/solana/client.go b/node/pkg/solana/client.go index 8ed923c47..9e7637e6c 100644 --- a/node/pkg/solana/client.go +++ b/node/pkg/solana/client.go @@ -299,6 +299,14 @@ OUTER: continue } + if tx.Meta.Err != nil { + logger.Debug("skipping failed Wormhole transaction", + zap.Stringer("signature", signature), + zap.Uint64("slot", slot), + zap.String("commitment", string(s.commitment))) + continue + } + logger.Info("found Wormhole transaction", zap.Stringer("signature", signature), zap.Uint64("slot", slot),