@@ -126,15 +126,15 @@ func TestIntermediateLeaks(t *testing.T) {
126
126
}
127
127
128
128
// Commit and cross check the databases.
129
- transRoot , err := transState .Commit (0 , false , false )
129
+ transRoot , err := transState .Commit (0 , false )
130
130
if err != nil {
131
131
t .Fatalf ("failed to commit transition state: %v" , err )
132
132
}
133
133
if err = transNdb .Commit (transRoot , false ); err != nil {
134
134
t .Errorf ("can not commit trie %v to persistent database" , transRoot .Hex ())
135
135
}
136
136
137
- finalRoot , err := finalState .Commit (0 , false , false )
137
+ finalRoot , err := finalState .Commit (0 , false )
138
138
if err != nil {
139
139
t .Fatalf ("failed to commit final state: %v" , err )
140
140
}
@@ -542,7 +542,7 @@ func (test *snapshotTest) checkEqual(state, checkstate *StateDB) error {
542
542
func TestTouchDelete (t * testing.T ) {
543
543
s := newStateEnv ()
544
544
s .state .getOrNewStateObject (common.Address {})
545
- root , _ := s .state .Commit (0 , false , false )
545
+ root , _ := s .state .Commit (0 , false )
546
546
s .state , _ = NewWithSnapshot (root , s .state .db , s .state .snap )
547
547
548
548
snapshot := s .state .Snapshot ()
@@ -630,7 +630,7 @@ func TestCopyCommitCopy(t *testing.T) {
630
630
t .Fatalf ("second copy committed storage slot mismatch: have %x, want %x" , val , sval )
631
631
}
632
632
// Commit state, ensure states can be loaded from disk
633
- root , _ := state .Commit (0 , false , false )
633
+ root , _ := state .Commit (0 , false )
634
634
state , _ = New (root , tdb , nil )
635
635
if balance := state .GetBalance (addr ); balance .Cmp (uint256 .NewInt (42 )) != 0 {
636
636
t .Fatalf ("state post-commit balance mismatch: have %v, want %v" , balance , 42 )
@@ -744,7 +744,7 @@ func TestCommitCopy(t *testing.T) {
744
744
t .Fatalf ("initial committed storage slot mismatch: have %x, want %x" , val , common.Hash {})
745
745
}
746
746
// Copy the committed state database, the copied one is not functional.
747
- state .Commit (0 , true , false )
747
+ state .Commit (0 , true )
748
748
copied := state .Copy ()
749
749
if balance := copied .GetBalance (addr ); balance .Cmp (uint256 .NewInt (0 )) != 0 {
750
750
t .Fatalf ("unexpected balance: have %v" , balance )
@@ -778,7 +778,7 @@ func TestDeleteCreateRevert(t *testing.T) {
778
778
addr := common .BytesToAddress ([]byte ("so" ))
779
779
state .SetBalance (addr , uint256 .NewInt (1 ))
780
780
781
- root , _ := state .Commit (0 , false , false )
781
+ root , _ := state .Commit (0 , false )
782
782
state , _ = NewWithSnapshot (root , state .db , state .snap )
783
783
784
784
// Simulate self-destructing in one transaction, then create-reverting in another
@@ -790,7 +790,7 @@ func TestDeleteCreateRevert(t *testing.T) {
790
790
state .RevertToSnapshot (id )
791
791
792
792
// Commit the entire state and make sure we don't crash and have the correct state
793
- root , _ = state .Commit (0 , true , false )
793
+ root , _ = state .Commit (0 , true )
794
794
state , _ = NewWithSnapshot (root , state .db , state .snap )
795
795
796
796
if state .getStateObject (addr ) != nil {
@@ -833,7 +833,7 @@ func testMissingTrieNodes(t *testing.T, scheme string) {
833
833
a2 := common .BytesToAddress ([]byte ("another" ))
834
834
state .SetBalance (a2 , uint256 .NewInt (100 ))
835
835
state .SetCode (a2 , []byte {1 , 2 , 4 })
836
- root , _ = state .Commit (0 , false , false )
836
+ root , _ = state .Commit (0 , false )
837
837
t .Logf ("root: %x" , root )
838
838
// force-flush
839
839
tdb .Commit (root , false )
@@ -857,7 +857,7 @@ func testMissingTrieNodes(t *testing.T, scheme string) {
857
857
}
858
858
// Modify the state
859
859
state .SetBalance (addr , uint256 .NewInt (2 ))
860
- root , err := state .Commit (0 , false , false )
860
+ root , err := state .Commit (0 , false )
861
861
if err == nil {
862
862
t .Fatalf ("expected error, got root :%x" , root )
863
863
}
@@ -1053,7 +1053,7 @@ func TestFlushOrderDataLoss(t *testing.T) {
1053
1053
state .SetState (common.Address {a }, common.Hash {a , s }, common.Hash {a , s })
1054
1054
}
1055
1055
}
1056
- root , err := state .Commit (0 , false , false )
1056
+ root , err := state .Commit (0 , false )
1057
1057
if err != nil {
1058
1058
t .Fatalf ("failed to commit state trie: %v" , err )
1059
1059
}
@@ -1132,7 +1132,7 @@ func TestResetObject(t *testing.T) {
1132
1132
state .CreateAccount (addr )
1133
1133
state .SetBalance (addr , uint256 .NewInt (2 ))
1134
1134
state .SetState (addr , slotB , common .BytesToHash ([]byte {0x2 }))
1135
- root , _ := state .CommitWithSnap (0 , true , snaps , common.Hash {}, common.Hash {}, false )
1135
+ root , _ := state .CommitWithSnap (0 , true , snaps , common.Hash {}, common.Hash {})
1136
1136
1137
1137
// Ensure the original account is wiped properly
1138
1138
snap := snaps .Snapshot (root )
@@ -1163,7 +1163,7 @@ func TestDeleteStorage(t *testing.T) {
1163
1163
value := common .Hash (uint256 .NewInt (uint64 (10 * i )).Bytes32 ())
1164
1164
state .SetState (addr , slot , value )
1165
1165
}
1166
- root , _ := state .CommitWithSnap (0 , true , snaps , common.Hash {}, common.Hash {}, false )
1166
+ root , _ := state .CommitWithSnap (0 , true , snaps , common.Hash {}, common.Hash {})
1167
1167
// Init phase done, create two states, one with snap and one without
1168
1168
fastState , _ := New (root , db , snaps )
1169
1169
slowState , _ := New (root , db , nil )
0 commit comments