From 221e55bee68736419c3d3616457463e6e152da3a Mon Sep 17 00:00:00 2001 From: lash Date: Tue, 10 Apr 2018 12:12:48 +0200 Subject: [PATCH] swarm/pss: Add documentation for AllowRaw param --- swarm/pss/pss.go | 2 +- swarm/pss/pss_test.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/swarm/pss/pss.go b/swarm/pss/pss.go index 66c20184b3..b788fd050a 100644 --- a/swarm/pss/pss.go +++ b/swarm/pss/pss.go @@ -72,7 +72,7 @@ type PssParams struct { CacheTTL time.Duration privateKey *ecdsa.PrivateKey SymKeyCacheCapacity int - AllowRaw bool + AllowRaw bool // If true, enables sending and receiving messages without builtin pss encryption } // Sane defaults for Pss diff --git a/swarm/pss/pss_test.go b/swarm/pss/pss_test.go index 1c0084be44..6d06c9f264 100644 --- a/swarm/pss/pss_test.go +++ b/swarm/pss/pss_test.go @@ -946,6 +946,8 @@ outer: } +// check that in a network of a -> b -> c -> a +// a doesn't receive a sent message twice func TestDeduplication(t *testing.T) { var err error @@ -1278,7 +1280,9 @@ func benchmarkSymkeyBruteforceSameaddr(b *testing.B) { } } -// setup simulated network and connect nodes in circle +// setup simulated network with bzz/discovery and pss services. +// connects nodes in a circle +// if allowRaw is set, omission of builtin pss encryption is enabled (see PssParams) func setupNetwork(numnodes int, allowRaw bool) (clients []*rpc.Client, err error) { nodes := make([]*simulations.Node, numnodes) clients = make([]*rpc.Client, numnodes)