From e1de3afdfce2d43e99678016ffdcccc8ef02fb38 Mon Sep 17 00:00:00 2001 From: Elizabeth Engelman Date: Tue, 20 Aug 2019 09:02:18 -0500 Subject: [PATCH] Small changes to helper method names/arg names --- libraries/shared/fetcher/geth_rpc_storage_fetcher.go | 4 ++-- libraries/shared/storage/utils/diff.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/shared/fetcher/geth_rpc_storage_fetcher.go b/libraries/shared/fetcher/geth_rpc_storage_fetcher.go index de264328..7713a093 100644 --- a/libraries/shared/fetcher/geth_rpc_storage_fetcher.go +++ b/libraries/shared/fetcher/geth_rpc_storage_fetcher.go @@ -54,7 +54,7 @@ func (fetcher GethRpcStorageFetcher) FetchStorageDiffs(out chan<- utils.StorageD 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)) for _, account := range accounts { 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...) return append(accounts, stateDiff.DeletedAccounts...) } diff --git a/libraries/shared/storage/utils/diff.go b/libraries/shared/storage/utils/diff.go index 029dfbde..d7bdbc97 100644 --- a/libraries/shared/storage/utils/diff.go +++ b/libraries/shared/storage/utils/diff.go @@ -61,6 +61,6 @@ func FromGethStateDiff(account statediff.AccountDiff, stateDiff *statediff.State } } -func HexToKeccak256Hash(addr string) common.Hash { - return crypto.Keccak256Hash(common.FromHex(addr)) +func HexToKeccak256Hash(hex string) common.Hash { + return crypto.Keccak256Hash(common.FromHex(hex)) }