mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-05 18:31:37 +01:00
peer: pass unsafe-replay to link config
This commit is contained in:
7
peer.go
7
peer.go
@@ -402,7 +402,8 @@ func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) error {
|
|||||||
time.NewTicker(50 * time.Millisecond)),
|
time.NewTicker(50 * time.Millisecond)),
|
||||||
FwdPkgGCTicker: htlcswitch.NewBatchTicker(
|
FwdPkgGCTicker: htlcswitch.NewBatchTicker(
|
||||||
time.NewTicker(time.Minute)),
|
time.NewTicker(time.Minute)),
|
||||||
BatchSize: 10,
|
BatchSize: 10,
|
||||||
|
UnsafeReplay: cfg.UnsafeReplay,
|
||||||
}
|
}
|
||||||
link := htlcswitch.NewChannelLink(linkCfg, lnChan,
|
link := htlcswitch.NewChannelLink(linkCfg, lnChan,
|
||||||
uint32(currentHeight))
|
uint32(currentHeight))
|
||||||
@@ -1023,6 +1024,7 @@ func (p *peer) writeMessage(msg lnwire.Message) error {
|
|||||||
// NOTE: This method MUST be run as a goroutine.
|
// NOTE: This method MUST be run as a goroutine.
|
||||||
func (p *peer) writeHandler() {
|
func (p *peer) writeHandler() {
|
||||||
var exitErr error
|
var exitErr error
|
||||||
|
|
||||||
out:
|
out:
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
@@ -1298,7 +1300,8 @@ out:
|
|||||||
time.NewTicker(50 * time.Millisecond)),
|
time.NewTicker(50 * time.Millisecond)),
|
||||||
FwdPkgGCTicker: htlcswitch.NewBatchTicker(
|
FwdPkgGCTicker: htlcswitch.NewBatchTicker(
|
||||||
time.NewTicker(time.Minute)),
|
time.NewTicker(time.Minute)),
|
||||||
BatchSize: 10,
|
BatchSize: 10,
|
||||||
|
UnsafeReplay: cfg.UnsafeReplay,
|
||||||
}
|
}
|
||||||
link := htlcswitch.NewChannelLink(linkConfig, newChan,
|
link := htlcswitch.NewChannelLink(linkConfig, newChan,
|
||||||
uint32(currentHeight))
|
uint32(currentHeight))
|
||||||
|
|||||||
Reference in New Issue
Block a user