From 413ece2ccc225d8172d21295abdaae744d8922a5 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Tue, 15 Dec 2020 11:22:14 +0100 Subject: [PATCH] itest: account for capped anchor commit fee rate in balance calc --- lntest/itest/lnd_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lntest/itest/lnd_test.go b/lntest/itest/lnd_test.go index b22bcf54..83e07e7f 100644 --- a/lntest/itest/lnd_test.go +++ b/lntest/itest/lnd_test.go @@ -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 }