Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui committed Sep 6, 2024
1 parent fb487cb commit 559b0fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vochain/state/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ func (v *State) GetAccount(address common.Address, committed bool) (*Account, er
return &acc, acc.Unmarshal(raw)
}

// GetAccountBalance retrieves the Account.Balance for an address.
// AccountBalance retrieves the Account.Balance for an address.
// Returns 0 and no error if the account does not exist.
// Committed is relative to the state on which the function is executed.
func (v *State) GetAccountBalance(address common.Address, committed bool) (uint64, error) {
func (v *State) AccountBalance(address common.Address, committed bool) (uint64, error) {
acc, err := v.GetAccount(address, committed)
if err != nil {
return 0, err
Expand Down
2 changes: 1 addition & 1 deletion vochain/transaction/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ func (t *TransactionHandler) checkFaucetPackageAndTransfer(txFaucetPackage *mode
)
}

balance, err := t.state.GetAccountBalance(txSenderAddress, false)
balance, err := t.state.AccountBalance(txSenderAddress, false)
if err != nil {
return false, fmt.Errorf("cannot get tx sender balance: %w", err)
}
Expand Down

0 comments on commit 559b0fe

Please sign in to comment.