mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 14:12:27 +02:00
htlcswitch: update tests to adhere to new FeeEstimator changes
This commit is contained in:
@ -1511,10 +1511,13 @@ func TestChannelLinkBandwidthConsistency(t *testing.T) {
|
||||
)
|
||||
|
||||
estimator := &lnwallet.StaticFeeEstimator{
|
||||
FeeRate: 24,
|
||||
Confirmation: 6,
|
||||
FeeRate: 24,
|
||||
}
|
||||
feePerKw := btcutil.Amount(estimator.EstimateFeePerWeight(1) * 1000)
|
||||
feePerWeight, err := estimator.EstimateFeePerWeight(1)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to query fee estimator: %v", err)
|
||||
}
|
||||
feePerKw := feePerWeight * 1000
|
||||
htlcFee := lnwire.NewMSatFromSatoshis(
|
||||
btcutil.Amount((int64(feePerKw) * lnwallet.HtlcWeight) / 1000),
|
||||
)
|
||||
@ -1643,10 +1646,13 @@ func TestChannelLinkBandwidthConsistencyOverflow(t *testing.T) {
|
||||
)
|
||||
|
||||
estimator := &lnwallet.StaticFeeEstimator{
|
||||
FeeRate: 24,
|
||||
Confirmation: 6,
|
||||
FeeRate: 24,
|
||||
}
|
||||
feePerKw := btcutil.Amount(estimator.EstimateFeePerWeight(1) * 1000)
|
||||
feePerWeight, err := estimator.EstimateFeePerWeight(1)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to query fee estimator: %v", err)
|
||||
}
|
||||
feePerKw := feePerWeight * 1000
|
||||
|
||||
addLinkHTLC := func(amt lnwire.MilliSatoshi) [32]byte {
|
||||
invoice, htlc, err := generatePayment(amt, amt, 5, mockBlob)
|
||||
|
Reference in New Issue
Block a user