Skip to content

Commit

Permalink
Fix shaddowing issue with transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Jun 7, 2024
1 parent 7c897bb commit 6d8c9f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eth/filters/api_subql.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func (api *SubqlAPI) resolveFieldSelector(ctx context.Context, fieldSelector *Fi
return nil
}

logTxs := []ethapi.RPCTransaction{}
logTxs := []*ethapi.RPCTransaction{}
txLogs := []*types.Log{}

// Fill in transactions for logs
Expand All @@ -275,7 +275,7 @@ func (api *SubqlAPI) resolveFieldSelector(ctx context.Context, fieldSelector *Fi
if err != nil {
return err
}
logTxs = append(logTxs, rpcTx)
logTxs = append(logTxs, &rpcTx)
}
}
}
Expand All @@ -298,7 +298,7 @@ func (api *SubqlAPI) resolveFieldSelector(ctx context.Context, fieldSelector *Fi

// Append after resolving so we don't resolve in a loop. e.g log -> transaction -> logs
for _, tx := range logTxs {
block.Transactions[*tx.TransactionIndex] = &tx
block.Transactions[*tx.TransactionIndex] = tx
}

for _, log := range txLogs {
Expand Down

0 comments on commit 6d8c9f3

Please sign in to comment.