diff options
author | holisticode <holistic.computing@gmail.com> | 2019-02-07 20:51:24 +0800 |
---|---|---|
committer | Rafael Matias <rafael@skyle.net> | 2019-02-19 19:57:53 +0800 |
commit | 1ecf2860cff6e4da75abbd1e6b30a9b1d69c5a12 (patch) | |
tree | 5c5aa2511ae0962ab1e6255471c87a48380794e6 /swarm/storage/filestore.go | |
parent | 034f65e9e8976f3ca7d9622e4c362ad9c26ad5f7 (diff) | |
download | dexon-1ecf2860cff6e4da75abbd1e6b30a9b1d69c5a12.tar dexon-1ecf2860cff6e4da75abbd1e6b30a9b1d69c5a12.tar.gz dexon-1ecf2860cff6e4da75abbd1e6b30a9b1d69c5a12.tar.bz2 dexon-1ecf2860cff6e4da75abbd1e6b30a9b1d69c5a12.tar.lz dexon-1ecf2860cff6e4da75abbd1e6b30a9b1d69c5a12.tar.xz dexon-1ecf2860cff6e4da75abbd1e6b30a9b1d69c5a12.tar.zst dexon-1ecf2860cff6e4da75abbd1e6b30a9b1d69c5a12.zip |
cmd/swarm: hashes command (#19008)
(cherry picked from commit 7f55b0cbd8618a1b0de8d7e37d2b0143ebae4abf)
Diffstat (limited to 'swarm/storage/filestore.go')
-rw-r--r-- | swarm/storage/filestore.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/swarm/storage/filestore.go b/swarm/storage/filestore.go index aebe03c1e..4240f5b1c 100644 --- a/swarm/storage/filestore.go +++ b/swarm/storage/filestore.go @@ -75,7 +75,7 @@ func NewFileStore(store ChunkStore, params *FileStoreParams) *FileStore { } } -// Public API. Main entry point for document retrieval directly. Used by the +// Retrieve is a public API. Main entry point for document retrieval directly. Used by the // FS-aware API and httpaccess // Chunk retrieval blocks on netStore requests with a timeout so reader will // report error if retrieval of chunks within requested range time out. @@ -87,7 +87,7 @@ func (f *FileStore) Retrieve(ctx context.Context, addr Address) (reader *LazyChu return } -// Public API. Main entry point for document storage directly. Used by the +// Store is a public API. Main entry point for document storage directly. Used by the // FS-aware API and httpaccess func (f *FileStore) Store(ctx context.Context, data io.Reader, size int64, toEncrypt bool) (addr Address, wait func(context.Context) error, err error) { putter := NewHasherStore(f.ChunkStore, f.hashFunc, toEncrypt) @@ -98,7 +98,7 @@ func (f *FileStore) HashSize() int { return f.hashFunc().Size() } -// Public API. This endpoint returns all chunk hashes (only) for a given file +// GetAllReferences is a public API. This endpoint returns all chunk hashes (only) for a given file func (f *FileStore) GetAllReferences(ctx context.Context, data io.Reader, toEncrypt bool) (addrs AddressCollection, err error) { // create a special kind of putter, which only will store the references putter := &HashExplorer{ |