multi test: update tests/mocks to use EstimateFeePerVSize

This commit is contained in:
Johan T. Halseth
2018-02-13 15:15:14 +01:00
parent ba3f3e1942
commit 7b30425111
4 changed files with 16 additions and 15 deletions

View File

@@ -138,19 +138,19 @@ func createTestPeer(notifier chainntnfs.ChainNotifier,
}
estimator := &lnwallet.StaticFeeEstimator{FeeRate: 50}
feePerWeight, err := estimator.EstimateFeePerWeight(1)
feePerVSize, err := estimator.EstimateFeePerVSize(1)
if err != nil {
return nil, nil, nil, nil, err
}
feePerKw := feePerWeight * 1000
feePerKw := feePerVSize.FeePerKWeight()
// TODO(roasbeef): need to factor in commit fee?
aliceCommit := channeldb.ChannelCommitment{
CommitHeight: 0,
LocalBalance: lnwire.NewMSatFromSatoshis(channelBal),
RemoteBalance: lnwire.NewMSatFromSatoshis(channelBal),
FeePerKw: feePerKw,
CommitFee: 8688,
FeePerKw: btcutil.Amount(feePerKw),
CommitFee: feePerKw.FeeForWeight(lnwallet.CommitWeight),
CommitTx: aliceCommitTx,
CommitSig: bytes.Repeat([]byte{1}, 71),
}
@@ -158,8 +158,8 @@ func createTestPeer(notifier chainntnfs.ChainNotifier,
CommitHeight: 0,
LocalBalance: lnwire.NewMSatFromSatoshis(channelBal),
RemoteBalance: lnwire.NewMSatFromSatoshis(channelBal),
FeePerKw: feePerKw,
CommitFee: 8688,
FeePerKw: btcutil.Amount(feePerKw),
CommitFee: feePerKw.FeeForWeight(lnwallet.CommitWeight),
CommitTx: bobCommitTx,
CommitSig: bytes.Repeat([]byte{1}, 71),
}