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
This commit is contained in:
Leo 2022-01-09 01:46:58 +01:00 committed by Leopold Schabel
parent 5de9d11b51
commit 33717ebcc9
1 changed files with 1 additions and 1 deletions

View File

@ -317,7 +317,7 @@ func (e *Watcher) Run(ctx context.Context) error {
zap.Error(err)) zap.Error(err))
continue continue
} }
if tx == nil { if tx == nil || err == rpc.ErrNoResult {
logger.Info("tx was orphaned", logger.Info("tx was orphaned",
zap.Stringer("tx", pLock.message.TxHash), zap.Stringer("tx", pLock.message.TxHash),
zap.Stringer("blockhash", key.BlockHash), zap.Stringer("blockhash", key.BlockHash),