@@ -98,7 +98,7 @@ func (s *Suite) TestAccount() {
9898 // create a contract account
9999 db .CreateAccount (address )
100100 db .SetCode (address , []byte ("hello world" ))
101- db .AddBalance (address , big .NewInt (100 ))
101+ db .AddBalanceSigned (address , big .NewInt (100 ))
102102 db .SetState (address , key1 , value1 )
103103 db .SetState (address , key2 , value2 )
104104 s .Require ().NoError (db .Commit ())
@@ -140,7 +140,7 @@ func (s *Suite) TestAccountOverride() {
140140 amount := big .NewInt (1 )
141141
142142 // init an EOA account, account overridden only happens on EOA account.
143- db .AddBalance (address , amount )
143+ db .AddBalanceSigned (address , amount )
144144 db .SetNonce (address , 1 )
145145
146146 // override
@@ -182,19 +182,19 @@ func (s *Suite) TestBalance() {
182182 expBalance * big.Int
183183 }{
184184 {"add balance" , func (db * statedb.StateDB ) {
185- db .AddBalance (address , big .NewInt (10 ))
185+ db .AddBalanceSigned (address , big .NewInt (10 ))
186186 }, big .NewInt (10 )},
187187 {"sub balance" , func (db * statedb.StateDB ) {
188- db .AddBalance (address , big .NewInt (10 ))
188+ db .AddBalanceSigned (address , big .NewInt (10 ))
189189 // get dirty balance
190190 s .Require ().Equal (big .NewInt (10 ), db .GetBalance (address ))
191- db .SubBalance (address , big .NewInt (2 ))
191+ db .AddBalanceSigned (address , big .NewInt (2 ))
192192 }, big .NewInt (8 )},
193193 {"add zero balance" , func (db * statedb.StateDB ) {
194- db .AddBalance (address , big .NewInt (0 ))
194+ db .AddBalanceSigned (address , big .NewInt (0 ))
195195 }, big .NewInt (0 )},
196196 {"sub zero balance" , func (db * statedb.StateDB ) {
197- db .SubBalance (address , big .NewInt (0 ))
197+ db .AddBalanceSigned (address , big .NewInt (0 ))
198198 }, big .NewInt (0 )},
199199 }
200200
@@ -366,7 +366,7 @@ func (s *Suite) TestRevertSnapshot() {
366366 // do some arbitrary changes to the storage
367367 db := deps .NewStateDB ()
368368 db .SetNonce (address , 1 )
369- db .AddBalance (address , big .NewInt (100 ))
369+ db .AddBalanceSigned (address , big .NewInt (100 ))
370370 db .SetCode (address , []byte ("hello world" ))
371371 db .SetState (address , v1 , v2 )
372372 db .SetNonce (address2 , 1 )
0 commit comments