Skip to content

Commit 1fc383a

Browse files
cody-littleyethenotethan
authored andcommitted
fix: auditor finding 7 (#1544)
Fix auditor finding 7. Signed-off-by: Cody Littley <[email protected]>
1 parent c17fa8b commit 1fc383a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

node/node_v2.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,14 @@ func (n *Node) DownloadBundles(
157157
// TODO (cody-littley) this is flaky, and will fail if any relay fails. We should retry failures
158158
return nil, nil, fmt.Errorf("failed to get chunks from relays: %v", resp.err)
159159
}
160+
160161
if len(resp.bundles) != len(resp.metadata) {
161162
return nil, nil, fmt.Errorf("number of bundles and metadata do not match (%d != %d)",
162163
len(resp.bundles), len(resp.metadata))
163164
}
164-
for i, bundle := range resp.bundles {
165-
metadata := resp.metadata[i]
165+
166+
for j, bundle := range resp.bundles {
167+
metadata := resp.metadata[j]
166168
blobShards[metadata.blobShardIndex].Bundles[metadata.quorum], err = new(core.Bundle).Deserialize(bundle)
167169
if err != nil {
168170
return nil, nil, fmt.Errorf("failed to deserialize bundle: %v", err)

0 commit comments

Comments
 (0)