fundingmanager: add maxHtlcs to openChanReq
This commit is contained in:
parent
8a22e4fd1c
commit
ef69537c7f
@ -3110,6 +3110,7 @@ func (f *fundingManager) handleInitFundingMsg(msg *initFundingMsg) {
|
||||
minHtlcIn = msg.minHtlcIn
|
||||
remoteCsvDelay = msg.remoteCsvDelay
|
||||
maxValue = msg.maxValueInFlight
|
||||
maxHtlcs = msg.maxHtlcs
|
||||
)
|
||||
|
||||
// We'll determine our dust limit depending on which chain is active.
|
||||
@ -3248,6 +3249,10 @@ func (f *fundingManager) handleInitFundingMsg(msg *initFundingMsg) {
|
||||
maxValue = f.cfg.RequiredRemoteMaxValue(capacity)
|
||||
}
|
||||
|
||||
if maxHtlcs == 0 {
|
||||
maxHtlcs = f.cfg.RequiredRemoteMaxHTLCs(capacity)
|
||||
}
|
||||
|
||||
// If a pending channel map for this peer isn't already created, then
|
||||
// we create one, ultimately allowing us to track this pending
|
||||
// reservation within the target peer.
|
||||
@ -3281,7 +3286,6 @@ func (f *fundingManager) handleInitFundingMsg(msg *initFundingMsg) {
|
||||
// policy to determine of required commitment constraints for the
|
||||
// remote party.
|
||||
chanReserve := f.cfg.RequiredRemoteChanReserve(capacity, ourDustLimit)
|
||||
maxHtlcs := f.cfg.RequiredRemoteMaxHTLCs(capacity)
|
||||
|
||||
fndgLog.Infof("Starting funding workflow with %v for pending_id(%x), "+
|
||||
"committype=%v", msg.peer.Address(), chanID, commitType)
|
||||
|
@ -3343,6 +3343,8 @@ type openChanReq struct {
|
||||
// be pending within the channel. It only applies to the remote party.
|
||||
maxValueInFlight lnwire.MilliSatoshi
|
||||
|
||||
maxHtlcs uint16
|
||||
|
||||
// TODO(roasbeef): add ability to specify channel constraints as well
|
||||
|
||||
// chanFunder is an optional channel funder that allows the caller to
|
||||
|
Loading…
Reference in New Issue
Block a user