Small changes to helper method names/arg names

This commit is contained in:
Elizabeth Engelman 2019-08-20 09:02:18 -05:00
parent 2ff88de859
commit e1de3afdfc
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ func (fetcher GethRpcStorageFetcher) FetchStorageDiffs(out chan<- utils.StorageD
errs <- decodeErr errs <- decodeErr
} }
accounts := getAccountDiffs(*stateDiff) accounts := getAccountsFromDiff(*stateDiff)
logrus.Trace(fmt.Sprintf("iterating through %d accounts on stateDiff for block %d", len(accounts), stateDiff.BlockNumber)) logrus.Trace(fmt.Sprintf("iterating through %d accounts on stateDiff for block %d", len(accounts), stateDiff.BlockNumber))
for _, account := range accounts { for _, account := range accounts {
logrus.Trace(fmt.Sprintf("iterating through %d Storage values on account", len(account.Storage))) logrus.Trace(fmt.Sprintf("iterating through %d Storage values on account", len(account.Storage)))
@ -66,7 +66,7 @@ func (fetcher GethRpcStorageFetcher) FetchStorageDiffs(out chan<- utils.StorageD
} }
} }
func getAccountDiffs(stateDiff statediff.StateDiff) []statediff.AccountDiff { func getAccountsFromDiff(stateDiff statediff.StateDiff) []statediff.AccountDiff {
accounts := append(stateDiff.CreatedAccounts, stateDiff.UpdatedAccounts...) accounts := append(stateDiff.CreatedAccounts, stateDiff.UpdatedAccounts...)
return append(accounts, stateDiff.DeletedAccounts...) return append(accounts, stateDiff.DeletedAccounts...)
} }

View File

@ -61,6 +61,6 @@ func FromGethStateDiff(account statediff.AccountDiff, stateDiff *statediff.State
} }
} }
func HexToKeccak256Hash(addr string) common.Hash { func HexToKeccak256Hash(hex string) common.Hash {
return crypto.Keccak256Hash(common.FromHex(addr)) return crypto.Keccak256Hash(common.FromHex(hex))
} }