docs(core/state,core/vm): clarify Exist self-destruct semantics #31809#2315
docs(core/state,core/vm): clarify Exist self-destruct semantics #31809#2315gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
Conversation
…eum#31809 Clarify that Exist returns true for self-destructed accounts only within the current transaction. Align the StateDB interface comment with the StateDB implementation comment.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Clarifies the semantics of StateDB.Exist for self-destructed accounts, aligning the interface documentation (core/vm) with the concrete StateDB implementation (core/state) so readers understand the behavior is scoped to the current transaction.
Changes:
- Update
StateDB.Existdoc comment to specify it returnstruefor self-destructed accounts only within the current transaction. - Align the
core/vmStateDBinterface comment with thecore/stateStateDBimplementation comment. - Minor formatting/spacing adjustments in the interface for readability.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| core/vm/interface.go | Updates StateDB.Exist interface comment to clarify self-destruct “existence” is only within the current transaction (and adds spacing for readability). |
| core/state/statedb.go | Updates the StateDB.Exist implementation comment to match the clarified semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed changes
Clarify that Exist returns true for self-destructed accounts only within the current transaction. Align the StateDB interface comment with the StateDB implementation comment.
Ref: ethereum#31809
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which parts of the codebase does this PR touch?
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that