itest: account for capped anchor commit fee rate in balance calc

This commit is contained in:
Johan T. Halseth committed 2020-12-15 19:54:50 +01:00
1 parent 99bbd992d2
commit 413ece2ccc
1 file changed
+5 -1
+5 -1
View File
@@ -1166,8 +1166,12 @@ func (c commitType) calcStaticFee(numHTLCs int) btcutil.Amount {
// The anchor commitment type is slightly heavier, and we must also add
// the value of the two anchors to the resulting fee the initiator
// pays.
// pays. In addition the fee rate is capped at 10 sat/vbyte for anchor
// channels.
if c == commitTypeAnchors {
feePerKw = chainfee.SatPerKVByte(
lnwallet.DefaultAnchorsCommitMaxFeeRateSatPerVByte * 1000,
).FeePerKWeight()
commitWeight = input.AnchorCommitWeight
anchors = 2 * anchorSize
}