@@ -491,12 +491,12 @@ func TestGenerateWithExtraAccounts(t *testing.T) {
491491
492492 // Identical in the snap
493493 key := hashData ([]byte ("acc-1" ))
494- rawdb .WriteAccountSnapshot (helper .triedb . DiskDB () , key , val )
495- rawdb .WriteStorageSnapshot (helper .triedb . DiskDB () , key , hashData ([]byte ("key-1" )), []byte ("val-1" ))
496- rawdb .WriteStorageSnapshot (helper .triedb . DiskDB () , key , hashData ([]byte ("key-2" )), []byte ("val-2" ))
497- rawdb .WriteStorageSnapshot (helper .triedb . DiskDB () , key , hashData ([]byte ("key-3" )), []byte ("val-3" ))
498- rawdb .WriteStorageSnapshot (helper .triedb . DiskDB () , key , hashData ([]byte ("key-4" )), []byte ("val-4" ))
499- rawdb .WriteStorageSnapshot (helper .triedb . DiskDB () , key , hashData ([]byte ("key-5" )), []byte ("val-5" ))
494+ rawdb .WriteAccountSnapshot (helper .diskdb , key , val )
495+ rawdb .WriteStorageSnapshot (helper .diskdb , key , hashData ([]byte ("key-1" )), []byte ("val-1" ))
496+ rawdb .WriteStorageSnapshot (helper .diskdb , key , hashData ([]byte ("key-2" )), []byte ("val-2" ))
497+ rawdb .WriteStorageSnapshot (helper .diskdb , key , hashData ([]byte ("key-3" )), []byte ("val-3" ))
498+ rawdb .WriteStorageSnapshot (helper .diskdb , key , hashData ([]byte ("key-4" )), []byte ("val-4" ))
499+ rawdb .WriteStorageSnapshot (helper .diskdb , key , hashData ([]byte ("key-5" )), []byte ("val-5" ))
500500 }
501501 {
502502 // Account two exists only in the snapshot
@@ -508,15 +508,15 @@ func TestGenerateWithExtraAccounts(t *testing.T) {
508508 acc := & Account {Balance : big .NewInt (1 ), Root : stRoot , CodeHash : emptyCode .Bytes ()}
509509 val , _ := rlp .EncodeToBytes (acc )
510510 key := hashData ([]byte ("acc-2" ))
511- rawdb .WriteAccountSnapshot (helper .triedb . DiskDB () , key , val )
512- rawdb .WriteStorageSnapshot (helper .triedb . DiskDB () , key , hashData ([]byte ("b-key-1" )), []byte ("b-val-1" ))
513- rawdb .WriteStorageSnapshot (helper .triedb . DiskDB () , key , hashData ([]byte ("b-key-2" )), []byte ("b-val-2" ))
514- rawdb .WriteStorageSnapshot (helper .triedb . DiskDB () , key , hashData ([]byte ("b-key-3" )), []byte ("b-val-3" ))
511+ rawdb .WriteAccountSnapshot (helper .diskdb , key , val )
512+ rawdb .WriteStorageSnapshot (helper .diskdb , key , hashData ([]byte ("b-key-1" )), []byte ("b-val-1" ))
513+ rawdb .WriteStorageSnapshot (helper .diskdb , key , hashData ([]byte ("b-key-2" )), []byte ("b-val-2" ))
514+ rawdb .WriteStorageSnapshot (helper .diskdb , key , hashData ([]byte ("b-key-3" )), []byte ("b-val-3" ))
515515 }
516516 root := helper .Commit ()
517517
518518 // To verify the test: If we now inspect the snap db, there should exist extraneous storage items
519- if data := rawdb .ReadStorageSnapshot (helper .triedb . DiskDB () , hashData ([]byte ("acc-2" )), hashData ([]byte ("b-key-1" ))); data == nil {
519+ if data := rawdb .ReadStorageSnapshot (helper .diskdb , hashData ([]byte ("acc-2" )), hashData ([]byte ("b-key-1" ))); data == nil {
520520 t .Fatalf ("expected snap storage to exist" )
521521 }
522522 snap := generateSnapshot (helper .diskdb , helper .triedb , 16 , root )
@@ -534,7 +534,7 @@ func TestGenerateWithExtraAccounts(t *testing.T) {
534534 snap .genAbort <- stop
535535 <- stop
536536 // If we now inspect the snap db, there should exist no extraneous storage items
537- if data := rawdb .ReadStorageSnapshot (helper .triedb . DiskDB () , hashData ([]byte ("acc-2" )), hashData ([]byte ("b-key-1" ))); data != nil {
537+ if data := rawdb .ReadStorageSnapshot (helper .diskdb , hashData ([]byte ("acc-2" )), hashData ([]byte ("b-key-1" ))); data != nil {
538538 t .Fatalf ("expected slot to be removed, got %v" , string (data ))
539539 }
540540}
0 commit comments