Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Jan 6, 2026

Description

align selfdestruct behavior as go-ethereum

Closes: #905


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.50%. Comparing base (84c2a0a) to head (d1cf95c).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #921   +/-   ##
=======================================
  Coverage   65.49%   65.50%           
=======================================
  Files         318      318           
  Lines       22222    22226    +4     
=======================================
+ Hits        14555    14559    +4     
  Misses       6502     6502           
  Partials     1165     1165           
Files with missing lines Coverage Δ
x/vm/statedb/statedb.go 80.27% <100.00%> (+0.21%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

if obj.selfDestructed {
// For EIP-6780 same-tx self-destruct: persist code+account first so DeleteAccount's
// IsContract check can verify it, then immediately delete everything
if obj.code != nil && obj.dirtyCode && len(obj.code) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we test this path?

}
}

func (suite *StateDBTestSuite) TestEIP6780SameTxCodePersistence() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we test the error cases here too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot delete contract at previously funded address

2 participants