From 33717ebcc9e35f30573f29cf95d18fafff4a65ae Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 9 Jan 2022 01:46:58 +0100 Subject: [PATCH] node/pkg/ethereum: check for rpc.ErrNoResult with non-nil tx This cannot currently happen the way TransactionReceipt is implemented, but make sure to check the tx != nil case anyway in case the API is changed in future releases of go-ethereum. commit-id:b721f0be --- node/pkg/ethereum/watcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/pkg/ethereum/watcher.go b/node/pkg/ethereum/watcher.go index e05fcb3a..c4b9d72c 100644 --- a/node/pkg/ethereum/watcher.go +++ b/node/pkg/ethereum/watcher.go @@ -317,7 +317,7 @@ func (e *Watcher) Run(ctx context.Context) error { zap.Error(err)) continue } - if tx == nil { + if tx == nil || err == rpc.ErrNoResult { logger.Info("tx was orphaned", zap.Stringer("tx", pLock.message.TxHash), zap.Stringer("blockhash", key.BlockHash),