Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused code in record.go #471

Closed
konnov opened this issue Sep 8, 2021 · 0 comments · Fixed by #476
Closed

Unused code in record.go #471

konnov opened this issue Sep 8, 2021 · 0 comments · Fixed by #476
Assignees

Comments

@konnov
Copy link

konnov commented Sep 8, 2021

Surfaced from @informalsystems audit at hash da54c8d

The following code computes output hashes that are never used later in the code:

// Get the existing output hashes as both a slice and a map counting occurrences.
existingOutputHashes := make([]string, len(existing.Outputs))
existingOutputHashMap := map[string]int{}
for i, o := range existing.Outputs {
existingOutputHashes[i] = o.Hash
existingOutputHashMap[o.Hash]++
}

We recommend removing the unused code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants