mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
swarm/pss: Add documentation for AllowRaw param
This commit is contained in:
parent
e501442733
commit
221e55bee6
2 changed files with 6 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ type PssParams struct {
|
||||||
CacheTTL time.Duration
|
CacheTTL time.Duration
|
||||||
privateKey *ecdsa.PrivateKey
|
privateKey *ecdsa.PrivateKey
|
||||||
SymKeyCacheCapacity int
|
SymKeyCacheCapacity int
|
||||||
AllowRaw bool
|
AllowRaw bool // If true, enables sending and receiving messages without builtin pss encryption
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sane defaults for Pss
|
// Sane defaults for Pss
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
func TestDeduplication(t *testing.T) {
|
||||||
var err error
|
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) {
|
func setupNetwork(numnodes int, allowRaw bool) (clients []*rpc.Client, err error) {
|
||||||
nodes := make([]*simulations.Node, numnodes)
|
nodes := make([]*simulations.Node, numnodes)
|
||||||
clients = make([]*rpc.Client, numnodes)
|
clients = make([]*rpc.Client, numnodes)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue