diff options
author | Janoš Guljaš <janos@users.noreply.github.com> | 2019-02-26 23:09:32 +0800 |
---|---|---|
committer | Anton Evangelatov <anton.evangelatov@gmail.com> | 2019-02-26 23:09:32 +0800 |
commit | f0233948d2bc343deb17be06c1a0f93c3e004084 (patch) | |
tree | 2de37d1279309542dab76821ae246761522991e4 /swarm/storage/localstore/subscription_push.go | |
parent | b7e0dec6bdf40c94d51740fd2cf13321f69a6b15 (diff) | |
download | go-tangerine-f0233948d2bc343deb17be06c1a0f93c3e004084.tar go-tangerine-f0233948d2bc343deb17be06c1a0f93c3e004084.tar.gz go-tangerine-f0233948d2bc343deb17be06c1a0f93c3e004084.tar.bz2 go-tangerine-f0233948d2bc343deb17be06c1a0f93c3e004084.tar.lz go-tangerine-f0233948d2bc343deb17be06c1a0f93c3e004084.tar.xz go-tangerine-f0233948d2bc343deb17be06c1a0f93c3e004084.tar.zst go-tangerine-f0233948d2bc343deb17be06c1a0f93c3e004084.zip |
swarm/chunk: move chunk related declarations to chunk package (#19170)
Diffstat (limited to 'swarm/storage/localstore/subscription_push.go')
-rw-r--r-- | swarm/storage/localstore/subscription_push.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/swarm/storage/localstore/subscription_push.go b/swarm/storage/localstore/subscription_push.go index b13f29399..5cbc2eb6f 100644 --- a/swarm/storage/localstore/subscription_push.go +++ b/swarm/storage/localstore/subscription_push.go @@ -21,16 +21,16 @@ import ( "sync" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/swarm/chunk" "github.com/ethereum/go-ethereum/swarm/shed" - "github.com/ethereum/go-ethereum/swarm/storage" ) // SubscribePush returns a channel that provides storage chunks with ordering from push syncing index. // Returned stop function will terminate current and further iterations, and also it will close // the returned channel without any errors. Make sure that you check the second returned parameter // from the channel to stop iteration when its value is false. -func (db *DB) SubscribePush(ctx context.Context) (c <-chan storage.Chunk, stop func()) { - chunks := make(chan storage.Chunk) +func (db *DB) SubscribePush(ctx context.Context) (c <-chan chunk.Chunk, stop func()) { + chunks := make(chan chunk.Chunk) trigger := make(chan struct{}, 1) db.pushTriggersMu.Lock() @@ -65,7 +65,7 @@ func (db *DB) SubscribePush(ctx context.Context) (c <-chan storage.Chunk, stop f } select { - case chunks <- storage.NewChunk(dataItem.Address, dataItem.Data): + case chunks <- chunk.NewChunk(dataItem.Address, dataItem.Data): // set next iteration start item // when its chunk is successfully sent to channel sinceItem = &item |