This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
swarm/pss: Remove spurious forwarding #1008
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
nolash
force-pushed
the
pss-forward-nospurioussends
branch
2 times, most recently
from
November 26, 2018 22:59
0fbf0df
to
0bb8fe3
Compare
zelig
reviewed
Nov 28, 2018
@@ -915,39 +943,42 @@ func (p *Pss) forward(msg *PssMsg) error { | |||
} | |||
|
|||
// get the protocol peer from the forwarding peer cache | |||
sendMsg := fmt.Sprintf("MSG TO %x FROM %x VIA %x", to, p.BaseAddr(), sp.Address()) | |||
p.fwdPoolMu.RLock() | |||
pp := p.fwdPool[sp.Info().ID] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use already assigned local var sp.Info() -> info
// TODO: debug, remove in production | ||
// calculate proximity from returned kademlia peer to destination and log it | ||
powill, _ := p.Kademlia.Pof(sp.Address(), to, 0) | ||
log.Debug("forward", "topic", label(msg.Payload.Topic[:]), "self", label(p.BaseAddr()), "to", label(sp.Address()), "dest", label(to), "po", ponow, "advance", powill-ponow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonder if we need debug lines still
* accounts/keystore: reduce file name length * accounts/keystore: reduce code line width
nolash
force-pushed
the
pss-forward-nospurioussends
branch
from
November 29, 2018 10:13
0bb8fe3
to
e52c5ec
Compare
obsoleted by #1043 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #995
This PR is a cleanup of the change in forwarding algorithm introduced by @zelig in #971
Previously, redundancy forwards would be made if the previous peer was among nearest neighbors or within the "dark radius" (proximity order within the bounds of the part of the address not disclosed). However, it would not check if the next peer actually was within these bounds.
Further progress pending other merges: