From c5886a0966972f6a8745debb9be4f95dc2b69cdd Mon Sep 17 00:00:00 2001 From: hackyminer Date: Sat, 18 Aug 2018 07:44:43 +0900 Subject: [PATCH] swarm: fixed comment typo --- swarm/network/simulation/simulation.go | 2 +- swarm/network/stream/peer.go | 2 +- swarm/pot/doc.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/swarm/network/simulation/simulation.go b/swarm/network/simulation/simulation.go index 74f9d98ee9..e275998f9c 100644 --- a/swarm/network/simulation/simulation.go +++ b/swarm/network/simulation/simulation.go @@ -112,7 +112,7 @@ type Result struct { } // Run calls the RunFunc function while taking care of -// cancelation provided through the Context. +// cancellation provided through the Context. func (s *Simulation) Run(ctx context.Context, f RunFunc) (r Result) { //if the option is set to run a HTTP server with the simulation, //init the server and start it diff --git a/swarm/network/stream/peer.go b/swarm/network/stream/peer.go index 80b9ab711a..79f8d655a8 100644 --- a/swarm/network/stream/peer.go +++ b/swarm/network/stream/peer.go @@ -132,7 +132,7 @@ func (p *Peer) SendOfferedHashes(s *server, f, t uint64) error { if err != nil { return err } - // true only when quiting + // true only when quitting if len(hashes) == 0 { return nil } diff --git a/swarm/pot/doc.go b/swarm/pot/doc.go index 4c0a03065d..cb6faea57b 100644 --- a/swarm/pot/doc.go +++ b/swarm/pot/doc.go @@ -27,11 +27,11 @@ OR distance over finite set of integers). Methods take a comparison operator (pof, proximity order function) to compare two value types. The default pof assumes Val to be or project to a byte slice using -the reverse rank on the MSB first XOR logarithmic disctance. +the reverse rank on the MSB first XOR logarithmic distance. If the address space if limited, equality is defined as the maximum proximity order. -The container offers applicative (funcional) style methods on PO trees: +The container offers applicative (functional) style methods on PO trees: * adding/removing en element * swap (value based add/remove) * merging two PO trees (union)