diff options
author | holisticode <holistic.computing@gmail.com> | 2018-11-07 07:04:18 +0800 |
---|---|---|
committer | Viktor TrĂ³n <viktor.tron@gmail.com> | 2018-11-07 07:04:18 +0800 |
commit | 79c7a69ac8066cc28ceee2ebaab3d0221a8adf57 (patch) | |
tree | afbba15675b0b8a8153523bb661499673d4e43da /swarm/network/stream/snapshot_sync_test.go | |
parent | 53eb4e0b0fffdc105fbe9f5eed671b96de6e2ba1 (diff) | |
download | go-tangerine-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar go-tangerine-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar.gz go-tangerine-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar.bz2 go-tangerine-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar.lz go-tangerine-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar.xz go-tangerine-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar.zst go-tangerine-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.zip |
swarm: Better syncing and retrieval option definition (#17986)
* swarm: Better syncing and retrieval option definition
* swarm/network/stream: better comments
* swarm/network/stream: addressed PR comments
Diffstat (limited to 'swarm/network/stream/snapshot_sync_test.go')
-rw-r--r-- | swarm/network/stream/snapshot_sync_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/swarm/network/stream/snapshot_sync_test.go b/swarm/network/stream/snapshot_sync_test.go index 8d89f28cb..2ddbed936 100644 --- a/swarm/network/stream/snapshot_sync_test.go +++ b/swarm/network/stream/snapshot_sync_test.go @@ -165,8 +165,8 @@ func streamerFunc(ctx *adapters.ServiceContext, bucket *sync.Map) (s node.Servic netStore.NewNetFetcherFunc = network.NewFetcherFactory(dummyRequestFromPeers, true).New r := NewRegistry(addr.ID(), delivery, netStore, state.NewInmemoryStore(), &RegistryOptions{ - DoSync: true, - DoServeRetrieve: true, + Retrieval: RetrievalDisabled, + Syncing: SyncingAutoSubscribe, SyncUpdateDelay: 3 * time.Second, }) @@ -360,8 +360,8 @@ func testSyncingViaDirectSubscribe(t *testing.T, chunkCount int, nodeCount int) netStore.NewNetFetcherFunc = network.NewFetcherFactory(dummyRequestFromPeers, true).New r := NewRegistry(addr.ID(), delivery, netStore, state.NewInmemoryStore(), &RegistryOptions{ - DoServeRetrieve: true, - DoSync: true, + Retrieval: RetrievalDisabled, + Syncing: SyncingRegisterOnly, }) bucket.Store(bucketKeyRegistry, r) |