mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-17 22:24:21 +01:00
link: increase expiry grace delta
This commit increase the expiry grace delta to a value above the broadcast delta. This prevents htlcs from being accepted that would immediately trigger a channel force close. A correct delta is generated in server.go where there is access to the broadcast delta and passed via the peer to the links. Co-authored-by: Jim Posen <jim.posen@gmail.com>
This commit is contained in:
@@ -1019,6 +1019,7 @@ func (h *hopNetwork) createChannelLink(server, peer *mockServer,
|
||||
fwdPkgTimeout = 15 * time.Second
|
||||
minFeeUpdateTimeout = 30 * time.Minute
|
||||
maxFeeUpdateTimeout = 40 * time.Minute
|
||||
expiryGraceDelta = 3
|
||||
)
|
||||
|
||||
link := NewChannelLink(
|
||||
@@ -1048,6 +1049,7 @@ func (h *hopNetwork) createChannelLink(server, peer *mockServer,
|
||||
MinFeeUpdateTimeout: minFeeUpdateTimeout,
|
||||
MaxFeeUpdateTimeout: maxFeeUpdateTimeout,
|
||||
OnChannelFailure: func(lnwire.ChannelID, lnwire.ShortChannelID, LinkFailureError) {},
|
||||
ExpiryGraceDelta: expiryGraceDelta,
|
||||
},
|
||||
channel,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user