mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/storage: bug fix in GetAllReferences
This commit is contained in:
parent
7b56fd29cf
commit
ce973dc31a
1 changed files with 2 additions and 3 deletions
|
|
@ -111,11 +111,10 @@ func (f *FileStore) GetAllReferences(ctx context.Context, data io.Reader, toEncr
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// collect all references
|
// collect all references
|
||||||
arr := make([]Address, 0)
|
addrs = NewAddressCollection(0)
|
||||||
for _, ref := range putter.References {
|
for _, ref := range putter.References {
|
||||||
arr = append(arr, Address(ref))
|
addrs = append(addrs, Address(ref))
|
||||||
}
|
}
|
||||||
addrs = NewAddressCollection(len(arr))
|
|
||||||
sort.Sort(addrs)
|
sort.Sort(addrs)
|
||||||
return addrs, nil
|
return addrs, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue