Why is htlc_weight added twice when calculating fee buffer? #9216
Unanswered
ShookLyngs
asked this question in
Q&A
Replies: 1 comment
-
Okay, it seems the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If our node is the initiator of an ANCHORS channel with someone, when calculating the
Bandwidth()
of our node to determine whether we can add one more HTLC to the commitment transaction and prevent a series of problems, based on BOLT02, we will need to recalculate thecommit_fee
by doubling the currentfee_per_kw
.So the estimated calculation for our case, if I'm not misunderstanding, should be:
However, in the current implementation, the
htlc_weight
is added twice during the calculation:LightningChannel.availableCommitmentBalance()
CalcFeeBuffer()
Did I misunderstand? Or is this some kind of bug?
Beta Was this translation helpful? Give feedback.
All reactions