@@ -153,20 +153,20 @@ func (j *journal) logChange(txHash common.Hash) {
153
153
}
154
154
155
155
func (j * journal ) createObject (addr common.Address ) {
156
- j .append (createObjectChange {account : & addr })
156
+ j .append (createObjectChange {account : addr })
157
157
}
158
158
159
159
func (j * journal ) createContract (addr common.Address ) {
160
160
j .append (createContractChange {account : addr })
161
161
}
162
162
163
163
func (j * journal ) destruct (addr common.Address ) {
164
- j .append (selfDestructChange {account : & addr })
164
+ j .append (selfDestructChange {account : addr })
165
165
}
166
166
167
167
func (j * journal ) storageChange (addr common.Address , key , prev , origin common.Hash ) {
168
168
j .append (storageChange {
169
- account : & addr ,
169
+ account : addr ,
170
170
key : key ,
171
171
prevvalue : prev ,
172
172
origvalue : origin ,
@@ -175,7 +175,7 @@ func (j *journal) storageChange(addr common.Address, key, prev, origin common.Ha
175
175
176
176
func (j * journal ) transientStateChange (addr common.Address , key , prev common.Hash ) {
177
177
j .append (transientStorageChange {
178
- account : & addr ,
178
+ account : addr ,
179
179
key : key ,
180
180
prevalue : prev ,
181
181
})
@@ -187,25 +187,25 @@ func (j *journal) refundChange(previous uint64) {
187
187
188
188
func (j * journal ) balanceChange (addr common.Address , previous * uint256.Int ) {
189
189
j .append (balanceChange {
190
- account : & addr ,
190
+ account : addr ,
191
191
prev : previous .Clone (),
192
192
})
193
193
}
194
194
195
195
func (j * journal ) setCode (address common.Address ) {
196
- j .append (codeChange {account : & address })
196
+ j .append (codeChange {account : address })
197
197
}
198
198
199
199
func (j * journal ) nonceChange (address common.Address , prev uint64 ) {
200
200
j .append (nonceChange {
201
- account : & address ,
201
+ account : address ,
202
202
prev : prev ,
203
203
})
204
204
}
205
205
206
206
func (j * journal ) touchChange (address common.Address ) {
207
207
j .append (touchChange {
208
- account : & address ,
208
+ account : address ,
209
209
})
210
210
if address == ripemd {
211
211
// Explicitly put it in the dirty-cache, which is otherwise generated from
@@ -215,50 +215,48 @@ func (j *journal) touchChange(address common.Address) {
215
215
}
216
216
217
217
func (j * journal ) accessListAddAccount (addr common.Address ) {
218
- j .append (accessListAddAccountChange {& addr })
218
+ j .append (accessListAddAccountChange {addr })
219
219
}
220
220
221
221
func (j * journal ) accessListAddSlot (addr common.Address , slot common.Hash ) {
222
222
j .append (accessListAddSlotChange {
223
- address : & addr ,
224
- slot : & slot ,
223
+ address : addr ,
224
+ slot : slot ,
225
225
})
226
226
}
227
227
228
228
type (
229
229
// Changes to the account trie.
230
230
createObjectChange struct {
231
- account * common.Address
231
+ account common.Address
232
232
}
233
-
234
233
// createContractChange represents an account becoming a contract-account.
235
234
// This event happens prior to executing initcode. The journal-event simply
236
235
// manages the created-flag, in order to allow same-tx destruction.
237
236
createContractChange struct {
238
237
account common.Address
239
238
}
240
-
241
239
selfDestructChange struct {
242
- account * common.Address
240
+ account common.Address
243
241
}
244
242
245
243
// Changes to individual accounts.
246
244
balanceChange struct {
247
- account * common.Address
245
+ account common.Address
248
246
prev * uint256.Int
249
247
}
250
248
nonceChange struct {
251
- account * common.Address
249
+ account common.Address
252
250
prev uint64
253
251
}
254
252
storageChange struct {
255
- account * common.Address
253
+ account common.Address
256
254
key common.Hash
257
255
prevvalue common.Hash
258
256
origvalue common.Hash
259
257
}
260
258
codeChange struct {
261
- account * common.Address
259
+ account common.Address
262
260
}
263
261
264
262
// Changes to other state values.
@@ -269,31 +267,31 @@ type (
269
267
txhash common.Hash
270
268
}
271
269
touchChange struct {
272
- account * common.Address
270
+ account common.Address
273
271
}
274
272
275
273
// Changes to the access list
276
274
accessListAddAccountChange struct {
277
- address * common.Address
275
+ address common.Address
278
276
}
279
277
accessListAddSlotChange struct {
280
- address * common.Address
281
- slot * common.Hash
278
+ address common.Address
279
+ slot common.Hash
282
280
}
283
281
284
282
// Changes to transient storage
285
283
transientStorageChange struct {
286
- account * common.Address
284
+ account common.Address
287
285
key , prevalue common.Hash
288
286
}
289
287
)
290
288
291
289
func (ch createObjectChange ) revert (s * StateDB ) {
292
- delete (s .stateObjects , * ch .account )
290
+ delete (s .stateObjects , ch .account )
293
291
}
294
292
295
293
func (ch createObjectChange ) dirtied () * common.Address {
296
- return ch .account
294
+ return & ch .account
297
295
}
298
296
299
297
func (ch createObjectChange ) copy () journalEntry {
@@ -317,14 +315,14 @@ func (ch createContractChange) copy() journalEntry {
317
315
}
318
316
319
317
func (ch selfDestructChange ) revert (s * StateDB ) {
320
- obj := s .getStateObject (* ch .account )
318
+ obj := s .getStateObject (ch .account )
321
319
if obj != nil {
322
320
obj .selfDestructed = false
323
321
}
324
322
}
325
323
326
324
func (ch selfDestructChange ) dirtied () * common.Address {
327
- return ch .account
325
+ return & ch .account
328
326
}
329
327
330
328
func (ch selfDestructChange ) copy () journalEntry {
@@ -339,7 +337,7 @@ func (ch touchChange) revert(s *StateDB) {
339
337
}
340
338
341
339
func (ch touchChange ) dirtied () * common.Address {
342
- return ch .account
340
+ return & ch .account
343
341
}
344
342
345
343
func (ch touchChange ) copy () journalEntry {
@@ -349,11 +347,11 @@ func (ch touchChange) copy() journalEntry {
349
347
}
350
348
351
349
func (ch balanceChange ) revert (s * StateDB ) {
352
- s .getStateObject (* ch .account ).setBalance (ch .prev )
350
+ s .getStateObject (ch .account ).setBalance (ch .prev )
353
351
}
354
352
355
353
func (ch balanceChange ) dirtied () * common.Address {
356
- return ch .account
354
+ return & ch .account
357
355
}
358
356
359
357
func (ch balanceChange ) copy () journalEntry {
@@ -364,11 +362,11 @@ func (ch balanceChange) copy() journalEntry {
364
362
}
365
363
366
364
func (ch nonceChange ) revert (s * StateDB ) {
367
- s .getStateObject (* ch .account ).setNonce (ch .prev )
365
+ s .getStateObject (ch .account ).setNonce (ch .prev )
368
366
}
369
367
370
368
func (ch nonceChange ) dirtied () * common.Address {
371
- return ch .account
369
+ return & ch .account
372
370
}
373
371
374
372
func (ch nonceChange ) copy () journalEntry {
@@ -379,23 +377,23 @@ func (ch nonceChange) copy() journalEntry {
379
377
}
380
378
381
379
func (ch codeChange ) revert (s * StateDB ) {
382
- s .getStateObject (* ch .account ).setCode (types .EmptyCodeHash , nil )
380
+ s .getStateObject (ch .account ).setCode (types .EmptyCodeHash , nil )
383
381
}
384
382
385
383
func (ch codeChange ) dirtied () * common.Address {
386
- return ch .account
384
+ return & ch .account
387
385
}
388
386
389
387
func (ch codeChange ) copy () journalEntry {
390
388
return codeChange {account : ch .account }
391
389
}
392
390
393
391
func (ch storageChange ) revert (s * StateDB ) {
394
- s .getStateObject (* ch .account ).setState (ch .key , ch .prevvalue , ch .origvalue )
392
+ s .getStateObject (ch .account ).setState (ch .key , ch .prevvalue , ch .origvalue )
395
393
}
396
394
397
395
func (ch storageChange ) dirtied () * common.Address {
398
- return ch .account
396
+ return & ch .account
399
397
}
400
398
401
399
func (ch storageChange ) copy () journalEntry {
@@ -407,7 +405,7 @@ func (ch storageChange) copy() journalEntry {
407
405
}
408
406
409
407
func (ch transientStorageChange ) revert (s * StateDB ) {
410
- s .setTransientState (* ch .account , ch .key , ch .prevalue )
408
+ s .setTransientState (ch .account , ch .key , ch .prevalue )
411
409
}
412
410
413
411
func (ch transientStorageChange ) dirtied () * common.Address {
@@ -466,7 +464,7 @@ func (ch accessListAddAccountChange) revert(s *StateDB) {
466
464
(addr) at this point, since no storage adds can remain when come upon
467
465
a single (addr) change.
468
466
*/
469
- s .accessList .DeleteAddress (* ch .address )
467
+ s .accessList .DeleteAddress (ch .address )
470
468
}
471
469
472
470
func (ch accessListAddAccountChange ) dirtied () * common.Address {
@@ -480,7 +478,7 @@ func (ch accessListAddAccountChange) copy() journalEntry {
480
478
}
481
479
482
480
func (ch accessListAddSlotChange ) revert (s * StateDB ) {
483
- s .accessList .DeleteSlot (* ch .address , * ch .slot )
481
+ s .accessList .DeleteSlot (ch .address , ch .slot )
484
482
}
485
483
486
484
func (ch accessListAddSlotChange ) dirtied () * common.Address {
0 commit comments