Skip to content

Commit 0584124

Browse files
yperbasisSahil-4555
authored andcommitted
execution: less taxing fix for Chiado re-exec (#19070)
Less taxing than #18846. An alternative to #18918
1 parent ca1d4cd commit 0584124

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

execution/state/intra_block_state.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,13 @@ func (sdb *IntraBlockState) refreshVersionedAccount(addr accounts.Address, readA
10481048
// SubBalance subtracts amount from the account associated with addr.
10491049
// DESCRIBED: docs/programmers_guide/guide.md#address---identifier-of-an-account
10501050
func (sdb *IntraBlockState) SubBalance(addr accounts.Address, amount uint256.Int, reason tracing.BalanceChangeReason) error {
1051+
if amount.IsZero() && addr != params.SystemAddress {
1052+
// We skip this early exit if the sender is the system address
1053+
// because Gnosis has a special logic to create an empty system account
1054+
// even after Spurious Dragon (see PR 5645 and Issue 18276).
1055+
return nil
1056+
}
1057+
10511058
prev, wasCommited, _ := sdb.getBalance(addr)
10521059

10531060
if dbg.TraceTransactionIO && (sdb.trace || dbg.TraceAccount(addr.Handle())) {

0 commit comments

Comments
 (0)