Skip to content

Commit 1a8894b

Browse files
LLLeonkaralabe
authored andcommitted
core/state: uniform parameter style (#16398)
- Uniform code style.
1 parent 8044971 commit 1a8894b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

core/state/statedb.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ func (self *StateDB) GetCodeHash(addr common.Address) common.Hash {
235235
return common.BytesToHash(stateObject.CodeHash())
236236
}
237237

238-
func (self *StateDB) GetState(a common.Address, b common.Hash) common.Hash {
239-
stateObject := self.getStateObject(a)
238+
func (self *StateDB) GetState(addr common.Address, bhash common.Hash) common.Hash {
239+
stateObject := self.getStateObject(addr)
240240
if stateObject != nil {
241-
return stateObject.GetState(self.db, b)
241+
return stateObject.GetState(self.db, bhash)
242242
}
243243
return common.Hash{}
244244
}
@@ -250,8 +250,8 @@ func (self *StateDB) Database() Database {
250250

251251
// StorageTrie returns the storage trie of an account.
252252
// The return value is a copy and is nil for non-existent accounts.
253-
func (self *StateDB) StorageTrie(a common.Address) Trie {
254-
stateObject := self.getStateObject(a)
253+
func (self *StateDB) StorageTrie(addr common.Address) Trie {
254+
stateObject := self.getStateObject(addr)
255255
if stateObject == nil {
256256
return nil
257257
}
@@ -271,15 +271,15 @@ func (self *StateDB) HasSuicided(addr common.Address) bool {
271271
* SETTERS
272272
*/
273273

274-
// AddBalance adds amount to the account associated with addr
274+
// AddBalance adds amount to the account associated with addr.
275275
func (self *StateDB) AddBalance(addr common.Address, amount *big.Int) {
276276
stateObject := self.GetOrNewStateObject(addr)
277277
if stateObject != nil {
278278
stateObject.AddBalance(amount)
279279
}
280280
}
281281

282-
// SubBalance subtracts amount from the account associated with addr
282+
// SubBalance subtracts amount from the account associated with addr.
283283
func (self *StateDB) SubBalance(addr common.Address, amount *big.Int) {
284284
stateObject := self.GetOrNewStateObject(addr)
285285
if stateObject != nil {
@@ -308,7 +308,7 @@ func (self *StateDB) SetCode(addr common.Address, code []byte) {
308308
}
309309
}
310310

311-
func (self *StateDB) SetState(addr common.Address, key common.Hash, value common.Hash) {
311+
func (self *StateDB) SetState(addr common.Address, key, value common.Hash) {
312312
stateObject := self.GetOrNewStateObject(addr)
313313
if stateObject != nil {
314314
stateObject.SetState(self.db, key, value)
@@ -337,7 +337,7 @@ func (self *StateDB) Suicide(addr common.Address) bool {
337337
}
338338

339339
//
340-
// Setting, updating & deleting state object methods
340+
// Setting, updating & deleting state object methods.
341341
//
342342

343343
// updateStateObject writes the given object to the trie.
@@ -388,7 +388,7 @@ func (self *StateDB) setStateObject(object *stateObject) {
388388
self.stateObjects[object.Address()] = object
389389
}
390390

391-
// Retrieve a state object or create a new state object if nil
391+
// Retrieve a state object or create a new state object if nil.
392392
func (self *StateDB) GetOrNewStateObject(addr common.Address) *stateObject {
393393
stateObject := self.getStateObject(addr)
394394
if stateObject == nil || stateObject.deleted {

0 commit comments

Comments
 (0)