From 871740c7b29d7460ba073f523a97465974400c17 Mon Sep 17 00:00:00 2001 From: Fabio Barone Date: Sun, 3 Feb 2019 20:31:11 -0500 Subject: [PATCH] swarm/storage: with toEncrypt flag --- swarm/storage/filestore.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarm/storage/filestore.go b/swarm/storage/filestore.go index 86bbd6f48e..499e40ef5c 100644 --- a/swarm/storage/filestore.go +++ b/swarm/storage/filestore.go @@ -99,11 +99,11 @@ func (f *FileStore) HashSize() int { } // Public API. This endpoint returns all chunk hashes (only) for a given file -func (f *FileStore) GetAllReferences(ctx context.Context, data io.Reader) (addrs []Address, err error) { +func (f *FileStore) GetAllReferences(ctx context.Context, data io.Reader, toEncrypt bool) (addrs []Address, err error) { addrs = make([]Address, 0) // create a special kind of putter, which only will store the references putter := &HashExplorer{ - hasherStore: NewHasherStore(f.ChunkStore, f.hashFunc, false), + hasherStore: NewHasherStore(f.ChunkStore, f.hashFunc, toEncrypt), References: make([]Reference, 0), } // do the actual splitting anyway, no way around it