From ca0eb7997e2e5e08a518940c841dfac18fd9bfcc Mon Sep 17 00:00:00 2001 From: b00ris Date: Mon, 21 May 2018 14:54:39 +0300 Subject: [PATCH] whisper: remove pure --- whisper/whisperv6/api.go | 4 ++-- whisper/whisperv6/peer.go | 2 +- whisper/whisperv6/peer_test.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/whisper/whisperv6/api.go b/whisper/whisperv6/api.go index 2e475e4850..c4d1a9217d 100644 --- a/whisper/whisperv6/api.go +++ b/whisper/whisperv6/api.go @@ -192,14 +192,14 @@ func (api *PublicWhisperAPI) DeleteSymKey(ctx context.Context, id string) bool { return api.w.DeleteSymKey(id) } -// MakeLightClient turns the node into pure light client, which does not forward +// MakeLightClient turns the node into light client, which does not forward // any incoming messages, and sends only messages originated in this node. func (api *PublicWhisperAPI) MakeLightClient(ctx context.Context) bool { api.w.SetLightClientMode(true) return true } -// CancelLightClient cancels pure light client mode. +// CancelLightClient cancels light client mode. func (api *PublicWhisperAPI) CancelLightClient(ctx context.Context) bool { api.w.SetLightClientMode(false) return true diff --git a/whisper/whisperv6/peer.go b/whisper/whisperv6/peer.go index 2f01dfb5a4..08b47e8d9a 100644 --- a/whisper/whisperv6/peer.go +++ b/whisper/whisperv6/peer.go @@ -132,7 +132,7 @@ func (peer *Peer) handshake() error { b, err := s.Bool() if b && isLightNode && isRestrictedLightNodeConnection { - return fmt.Errorf("peer [%x] is useless: two pure light node communication restricted", peer.ID()) + return fmt.Errorf("peer [%x] is useless: two light client communication restricted", peer.ID()) } if err := <-errc; err != nil { diff --git a/whisper/whisperv6/peer_test.go b/whisper/whisperv6/peer_test.go index 35d752baf4..5b539d17b0 100644 --- a/whisper/whisperv6/peer_test.go +++ b/whisper/whisperv6/peer_test.go @@ -535,7 +535,7 @@ func TestHandshakeWithOldVersionWithoutLightModeFlag(t *testing.T) { } //two light nodes handshake. restriction disabled -func TestPureLightPeerHandshakeRestrictionOff(t *testing.T) { +func TestTwoLightPeerHandshakeRestrictionOff(t *testing.T) { w1 := Whisper{} w1.settings.Store(restrictConnectionBetweenLightClientsIdx, false) w1.SetLightClientMode(true) @@ -547,7 +547,7 @@ func TestPureLightPeerHandshakeRestrictionOff(t *testing.T) { } //two light nodes handshake. restriction enabled -func TestPureLightPeerHandshakeError(t *testing.T) { +func TestTwoLightPeerHandshakeError(t *testing.T) { w1 := Whisper{} w1.settings.Store(restrictConnectionBetweenLightClientsIdx, true) w1.SetLightClientMode(true)