@@ -329,27 +329,27 @@ func TestAccountIteratorTraversalValues(t *testing.T) {
329
329
h = make (map [common.Hash ][]byte )
330
330
)
331
331
for i := byte (2 ); i < 0xff ; i ++ {
332
- a [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 0 , i ) )
332
+ a [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 0 , i )
333
333
if i > 20 && i % 2 == 0 {
334
- b [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 1 , i ) )
334
+ b [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 1 , i )
335
335
}
336
336
if i % 4 == 0 {
337
- c [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 2 , i ) )
337
+ c [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 2 , i )
338
338
}
339
339
if i % 7 == 0 {
340
- d [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 3 , i ) )
340
+ d [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 3 , i )
341
341
}
342
342
if i % 8 == 0 {
343
- e [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 4 , i ) )
343
+ e [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 4 , i )
344
344
}
345
345
if i > 50 || i < 85 {
346
- f [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 5 , i ) )
346
+ f [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 5 , i )
347
347
}
348
348
if i % 64 == 0 {
349
- g [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 6 , i ) )
349
+ g [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 6 , i )
350
350
}
351
351
if i % 128 == 0 {
352
- h [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 7 , i ) )
352
+ h [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 7 , i )
353
353
}
354
354
}
355
355
// Assemble a stack of snapshots from the account layers
@@ -428,27 +428,27 @@ func TestStorageIteratorTraversalValues(t *testing.T) {
428
428
h = make (map [common.Hash ][]byte )
429
429
)
430
430
for i := byte (2 ); i < 0xff ; i ++ {
431
- a [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 0 , i ) )
431
+ a [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 0 , i )
432
432
if i > 20 && i % 2 == 0 {
433
- b [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 1 , i ) )
433
+ b [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 1 , i )
434
434
}
435
435
if i % 4 == 0 {
436
- c [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 2 , i ) )
436
+ c [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 2 , i )
437
437
}
438
438
if i % 7 == 0 {
439
- d [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 3 , i ) )
439
+ d [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 3 , i )
440
440
}
441
441
if i % 8 == 0 {
442
- e [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 4 , i ) )
442
+ e [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 4 , i )
443
443
}
444
444
if i > 50 || i < 85 {
445
- f [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 5 , i ) )
445
+ f [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 5 , i )
446
446
}
447
447
if i % 64 == 0 {
448
- g [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 6 , i ) )
448
+ g [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 6 , i )
449
449
}
450
450
if i % 128 == 0 {
451
- h [common.Hash {i }] = [] byte ( fmt .Sprintf ( "layer-%d, key %d" , 7 , i ) )
451
+ h [common.Hash {i }] = fmt .Appendf ( nil , "layer-%d, key %d" , 7 , i )
452
452
}
453
453
}
454
454
// Assemble a stack of snapshots from the account layers
0 commit comments