fundingmanager: add maxHtlcs to openChanReq
This commit is contained in:
2 files changed
+7
-1
No files matched your search
+5
-1
@@ -3110,6 +3110,7 @@ func (f *fundingManager) handleInitFundingMsg(msg *initFundingMsg) {
|
|||||||
minHtlcIn = msg.minHtlcIn
|
minHtlcIn = msg.minHtlcIn
|
||||||
remoteCsvDelay = msg.remoteCsvDelay
|
remoteCsvDelay = msg.remoteCsvDelay
|
||||||
maxValue = msg.maxValueInFlight
|
maxValue = msg.maxValueInFlight
|
||||||
|
maxHtlcs = msg.maxHtlcs
|
||||||
)
|
)
|
||||||
|
|
||||||
// We'll determine our dust limit depending on which chain is active.
|
// 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)
|
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
|
// If a pending channel map for this peer isn't already created, then
|
||||||
// we create one, ultimately allowing us to track this pending
|
// we create one, ultimately allowing us to track this pending
|
||||||
// reservation within the target peer.
|
// reservation within the target peer.
|
||||||
@@ -3281,7 +3286,6 @@ func (f *fundingManager) handleInitFundingMsg(msg *initFundingMsg) {
|
|||||||
// policy to determine of required commitment constraints for the
|
// policy to determine of required commitment constraints for the
|
||||||
// remote party.
|
// remote party.
|
||||||
chanReserve := f.cfg.RequiredRemoteChanReserve(capacity, ourDustLimit)
|
chanReserve := f.cfg.RequiredRemoteChanReserve(capacity, ourDustLimit)
|
||||||
maxHtlcs := f.cfg.RequiredRemoteMaxHTLCs(capacity)
|
|
||||||
|
|
||||||
fndgLog.Infof("Starting funding workflow with %v for pending_id(%x), "+
|
fndgLog.Infof("Starting funding workflow with %v for pending_id(%x), "+
|
||||||
"committype=%v", msg.peer.Address(), chanID, commitType)
|
"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.
|
// be pending within the channel. It only applies to the remote party.
|
||||||
maxValueInFlight lnwire.MilliSatoshi
|
maxValueInFlight lnwire.MilliSatoshi
|
||||||
|
|
||||||
|
maxHtlcs uint16
|
||||||
|
|
||||||
// TODO(roasbeef): add ability to specify channel constraints as well
|
// TODO(roasbeef): add ability to specify channel constraints as well
|
||||||
|
|
||||||
// chanFunder is an optional channel funder that allows the caller to
|
// chanFunder is an optional channel funder that allows the caller to
|
||||||
|
|||||||
Reference in new issue
Block a user