Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: transaction receipt status seems wrong #2275

Open
VictorTrustyDev opened this issue Jan 17, 2024 · 2 comments
Open

Problem: transaction receipt status seems wrong #2275

VictorTrustyDev opened this issue Jan 17, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@VictorTrustyDev
Copy link
Contributor

VictorTrustyDev commented Jan 17, 2024

Context

if !res.Failed() {
receipt.Status = ethtypes.ReceiptStatusSuccessful
// Only call hooks if tx executed successfully.
if err = k.PostTxProcessing(tmpCtx, msg, receipt); err != nil {
// If hooks return error, revert the whole tx.
res.VmError = types.ErrPostTxProcessing.Error()
k.Logger(ctx).Error("tx post processing failed", "error", err)
// If the tx failed in post processing hooks, we should clear the logs
res.Logs = nil
} else if commit != nil {
// PostTxProcessing is successful, commit the tmpCtx
commit()
// Since the post-processing can alter the log, we need to update the result
res.Logs = types.NewLogsFromEth(receipt.Logs)
ctx.EventManager().EmitEvents(tmpCtx.EventManager().Events())
}
}

Transaction receipt status seems wrong

Line 215: receipt set to Success
Line 219+223: when post-processing failed, set VmError and clear the log without changing status

@ramacarlucho ramacarlucho self-assigned this Jan 19, 2024
Copy link

linear bot commented Jan 23, 2024

ENG-2467 Issue 2275

@ramacarlucho ramacarlucho added the bug Something isn't working label Feb 14, 2024
Copy link

This issue is stale because it has been open 45 days with no activity. Remove Status: Stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2024
@MalteHerrmann MalteHerrmann reopened this Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants