Skip to content

Commit

Permalink
cleanup server.go
Browse files Browse the repository at this point in the history
  • Loading branch information
losh11 committed Jun 21, 2022
1 parent d7effb5 commit 1ecf76b
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1141,17 +1141,10 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
SubscribeBreachComplete: s.breachArbiter.SubscribeBreachComplete,
}, dbs.ChanStateDB)

// Select the configuration and furnding parameters for Bitcoin or
// Litecoin, depending on the primary registered chain.
primaryChain := cfg.registeredChains.PrimaryChain()
chainCfg := cfg.Bitcoin
minRemoteDelay := funding.MinBtcRemoteDelay
maxRemoteDelay := funding.MaxBtcRemoteDelay
if primaryChain == chainreg.LitecoinChain {
chainCfg = cfg.Litecoin
minRemoteDelay = funding.MinLtcRemoteDelay
maxRemoteDelay = funding.MaxLtcRemoteDelay
}
// Select the configuration and funding parameters for Litecoin
chainCfg := cfg.Litecoin
minRemoteDelay := funding.MinLtcRemoteDelay
maxRemoteDelay := funding.MaxLtcRemoteDelay

var chanIDSeed [32]byte
if _, err := rand.Read(chanIDSeed[:]); err != nil {
Expand Down Expand Up @@ -1205,8 +1198,6 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
// in the case this gets re-orged out, and
// we will require more confirmations before
// we consider it open.
// TODO(halseth): Use Litecoin params in case
// of LTC channels.

// In case the user has explicitly specified
// a default value for the number of
Expand Down Expand Up @@ -1246,7 +1237,6 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
// close) linearly from minRemoteDelay blocks
// for small channels, to maxRemoteDelay blocks
// for channels of size MaxFundingAmount.
// TODO(halseth): Litecoin parameter for LTC.

// In case the user has explicitly specified
// a default value for the remote delay, we
Expand Down

0 comments on commit 1ecf76b

Please sign in to comment.