Skip to content

Commit

Permalink
server: populate gossiper with chainhash of active chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Roasbeef committed Sep 3, 2017
1 parent 0b4ff2a commit 2eb718e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
s.authGossiper, err = discovery.New(discovery.Config{
Router: s.chanRouter,
Notifier: s.cc.chainNotifier,
ChainHash: *activeNetParams.GenesisHash,
Broadcast: s.BroadcastMessage,
SendToPeer: s.SendToPeer,
ProofMatureDelta: 0,
Expand All @@ -289,9 +290,6 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
s.breachArbiter = newBreachArbiter(cc.wallet, chanDB, cc.chainNotifier,
s.htlcSwitch, s.cc.chainIO, s.cc.feeEstimator)

// TODO(roasbeef): introduce closure and config system to decouple the
// initialization above ^

// Create the connection manager which will be responsible for
// maintaining persistent outbound connections and also accepting new
// incoming connections
Expand Down Expand Up @@ -952,7 +950,6 @@ func (s *server) OutboundPeerConnected(connReq *connmgr.ConnReq, conn net.Conn)
conn.Close()
return
}

if _, ok := s.persistentConnReqs[pubStr]; !ok && connReq != nil {
srvrLog.Debugf("Ignoring cancelled outbound connection")
conn.Close()
Expand Down

0 comments on commit 2eb718e

Please sign in to comment.