Skip to content

Commit 1ca9902

Browse files
committed
Fix error check being in the wrong place
1 parent c1b837f commit 1ca9902

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eth/filters/api_subql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,10 @@ func (api *SubqlAPI) resolveFieldSelector(ctx context.Context, fieldSelector *Fi
271271
for _, log := range block.Logs {
272272
if _, ok := block.Transactions[hexutil.Uint64(log.TxIndex)]; !ok {
273273
_, tx, _, _ /*blockIndex*/, transactionIndex, err := api.backend.GetTransaction(ctx, log.TxHash)
274-
rpcTx := ethapi.NewRPCTransaction(tx, block.Header, transactionIndex, api.sys.backend.ChainConfig())
275274
if err != nil {
276275
return err
277276
}
277+
rpcTx := ethapi.NewRPCTransaction(tx, block.Header, transactionIndex, api.sys.backend.ChainConfig())
278278
logTxs = append(logTxs, &rpcTx)
279279
}
280280
}

0 commit comments

Comments
 (0)