aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-28 17:17:41 +0800
committerobscuren <geffobscura@gmail.com>2015-04-28 17:17:41 +0800
commit99027c79fe7406919d654ab482d8ad37fcf098ce (patch)
tree9f6625b30b9d63d28f7e86c69d31991daac4fbf7 /whisper/peer.go
parentbac455c0117f7095ee9c60ac75a249ddd66c2660 (diff)
parenta05c420371aa56657b86ba3dce6ebb087adb708d (diff)
downloadgo-tangerine-99027c79fe7406919d654ab482d8ad37fcf098ce.tar
go-tangerine-99027c79fe7406919d654ab482d8ad37fcf098ce.tar.gz
go-tangerine-99027c79fe7406919d654ab482d8ad37fcf098ce.tar.bz2
go-tangerine-99027c79fe7406919d654ab482d8ad37fcf098ce.tar.lz
go-tangerine-99027c79fe7406919d654ab482d8ad37fcf098ce.tar.xz
go-tangerine-99027c79fe7406919d654ab482d8ad37fcf098ce.tar.zst
go-tangerine-99027c79fe7406919d654ab482d8ad37fcf098ce.zip
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Conflicts: rpc/api.go
Diffstat (limited to 'whisper/peer.go')
-rw-r--r--whisper/peer.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/whisper/peer.go b/whisper/peer.go
index 28abf4260..9fdc28434 100644
--- a/whisper/peer.go
+++ b/whisper/peer.go
@@ -21,20 +21,15 @@ type peer struct {
quit chan struct{}
}
-// newPeer creates and initializes a new whisper peer connection, returning either
-// the newly constructed link or a failure reason.
-func newPeer(host *Whisper, remote *p2p.Peer, rw p2p.MsgReadWriter) (*peer, error) {
- p := &peer{
+// newPeer creates a new whisper peer object, but does not run the handshake itself.
+func newPeer(host *Whisper, remote *p2p.Peer, rw p2p.MsgReadWriter) *peer {
+ return &peer{
host: host,
peer: remote,
ws: rw,
known: set.New(),
quit: make(chan struct{}),
}
- if err := p.handshake(); err != nil {
- return nil, err
- }
- return p, nil
}
// start initiates the peer updater, periodically broadcasting the whisper packets