Small changes to helper method names/arg names
This commit is contained in:
parent
2ff88de859
commit
e1de3afdfc
@ -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...)
|
||||||
}
|
}
|
||||||
|
@ -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))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user