@@ -418,7 +418,6 @@ func (s *StateDB) ApplyMVWriteSet(writes []blockstm.WriteDescriptor) {
418
418
419
419
switch path .GetSubpath () {
420
420
case BalancePath :
421
- // todo: @anshalshukla || @cffls - check balance change reason
422
421
s .SetBalance (addr , sr .GetBalance (addr ), tracing .BalanceChangeUnspecified )
423
422
case NoncePath :
424
423
s .SetNonce (addr , sr .GetNonce (addr ))
@@ -1095,9 +1094,6 @@ func (s *StateDB) createObject(addr common.Address) *stateObject {
1095
1094
// consensus bug eventually.
1096
1095
func (s * StateDB ) CreateAccount (addr common.Address ) {
1097
1096
s .createObject (addr )
1098
- // todo: @anshalshukla || @cffls
1099
- // Check the below MV Write, balance path change have been removed
1100
- MVWrite (s , blockstm .NewAddressKey (addr ))
1101
1097
}
1102
1098
1103
1099
// CreateContract is used whenever a contract is created. This may be preceded
@@ -1107,13 +1103,14 @@ func (s *StateDB) CreateAccount(addr common.Address) {
1107
1103
// correctly handle EIP-6780 'delete-in-same-transaction' logic.
1108
1104
func (s * StateDB ) CreateContract (addr common.Address ) {
1109
1105
obj := s .getStateObject (addr )
1106
+ if obj != nil {
1107
+ obj = s .mvRecordWritten (obj )
1108
+ }
1110
1109
if ! obj .newContract {
1111
1110
obj .newContract = true
1112
1111
s .journal .append (createContractChange {account : addr })
1113
1112
}
1114
1113
1115
- // todo: @anshalshukla || @cffls
1116
- // Check the below MV Write, balance path change have been removed
1117
1114
MVWrite (s , blockstm .NewAddressKey (addr ))
1118
1115
}
1119
1116
0 commit comments