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/lightnode_test.go | |
parent | 53eb4e0b0fffdc105fbe9f5eed671b96de6e2ba1 (diff) | |
download | dexon-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar dexon-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar.gz dexon-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar.bz2 dexon-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar.lz dexon-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar.xz dexon-79c7a69ac8066cc28ceee2ebaab3d0221a8adf57.tar.zst dexon-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/lightnode_test.go')
-rw-r--r-- | swarm/network/stream/lightnode_test.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/swarm/network/stream/lightnode_test.go b/swarm/network/stream/lightnode_test.go index 0d3bc7f54..65cde2411 100644 --- a/swarm/network/stream/lightnode_test.go +++ b/swarm/network/stream/lightnode_test.go @@ -25,7 +25,8 @@ import ( // when it is serving Retrieve requests. func TestLigthnodeRetrieveRequestWithRetrieve(t *testing.T) { registryOptions := &RegistryOptions{ - DoServeRetrieve: true, + Retrieval: RetrievalClientOnly, + Syncing: SyncingDisabled, } tester, _, _, teardown, err := newStreamerTester(t, registryOptions) defer teardown() @@ -63,7 +64,8 @@ func TestLigthnodeRetrieveRequestWithRetrieve(t *testing.T) { // requests are disabled func TestLigthnodeRetrieveRequestWithoutRetrieve(t *testing.T) { registryOptions := &RegistryOptions{ - DoServeRetrieve: false, + Retrieval: RetrievalDisabled, + Syncing: SyncingDisabled, } tester, _, _, teardown, err := newStreamerTester(t, registryOptions) defer teardown() @@ -106,7 +108,8 @@ func TestLigthnodeRetrieveRequestWithoutRetrieve(t *testing.T) { // when syncing is enabled. func TestLigthnodeRequestSubscriptionWithSync(t *testing.T) { registryOptions := &RegistryOptions{ - DoSync: true, + Retrieval: RetrievalDisabled, + Syncing: SyncingRegisterOnly, } tester, _, _, teardown, err := newStreamerTester(t, registryOptions) defer teardown() @@ -150,7 +153,8 @@ func TestLigthnodeRequestSubscriptionWithSync(t *testing.T) { // when syncing is disabled. func TestLigthnodeRequestSubscriptionWithoutSync(t *testing.T) { registryOptions := &RegistryOptions{ - DoSync: false, + Retrieval: RetrievalDisabled, + Syncing: SyncingDisabled, } tester, _, _, teardown, err := newStreamerTester(t, registryOptions) defer teardown() |