server: populate gossiper with chainhash of active chain
This commit is contained in:
parent
0b4ff2aabb
commit
2eb718e177
@ -273,6 +273,7 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
|
|||||||
s.authGossiper, err = discovery.New(discovery.Config{
|
s.authGossiper, err = discovery.New(discovery.Config{
|
||||||
Router: s.chanRouter,
|
Router: s.chanRouter,
|
||||||
Notifier: s.cc.chainNotifier,
|
Notifier: s.cc.chainNotifier,
|
||||||
|
ChainHash: *activeNetParams.GenesisHash,
|
||||||
Broadcast: s.BroadcastMessage,
|
Broadcast: s.BroadcastMessage,
|
||||||
SendToPeer: s.SendToPeer,
|
SendToPeer: s.SendToPeer,
|
||||||
ProofMatureDelta: 0,
|
ProofMatureDelta: 0,
|
||||||
@ -289,9 +290,6 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
|
|||||||
s.breachArbiter = newBreachArbiter(cc.wallet, chanDB, cc.chainNotifier,
|
s.breachArbiter = newBreachArbiter(cc.wallet, chanDB, cc.chainNotifier,
|
||||||
s.htlcSwitch, s.cc.chainIO, s.cc.feeEstimator)
|
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
|
// Create the connection manager which will be responsible for
|
||||||
// maintaining persistent outbound connections and also accepting new
|
// maintaining persistent outbound connections and also accepting new
|
||||||
// incoming connections
|
// incoming connections
|
||||||
@ -952,7 +950,6 @@ func (s *server) OutboundPeerConnected(connReq *connmgr.ConnReq, conn net.Conn)
|
|||||||
conn.Close()
|
conn.Close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := s.persistentConnReqs[pubStr]; !ok && connReq != nil {
|
if _, ok := s.persistentConnReqs[pubStr]; !ok && connReq != nil {
|
||||||
srvrLog.Debugf("Ignoring cancelled outbound connection")
|
srvrLog.Debugf("Ignoring cancelled outbound connection")
|
||||||
conn.Close()
|
conn.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user