multi test: update tests/mocks to use EstimateFeePerVSize

This commit is contained in:
Johan T. Halseth committed 2018-02-26 22:42:27 +01:00
1 parent ba3f3e1942
commit 7b30425111
4 files changed
+16 -15

No files matched your search

+4 -4
View File
@@ -1331,18 +1331,18 @@ func createInitChannels(revocationWindow int) (*lnwallet.LightningChannel, *lnwa
}
estimator := &lnwallet.StaticFeeEstimator{FeeRate: 50}
feePerWeight, err := estimator.EstimateFeePerWeight(1)
feePerVSize, err := estimator.EstimateFeePerVSize(1)
if err != nil {
return 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,
FeePerKw: btcutil.Amount(feePerKw),
CommitFee: 8688,
CommitTx: aliceCommitTx,
CommitSig: bytes.Repeat([]byte{1}, 71),
@@ -1351,7 +1351,7 @@ func createInitChannels(revocationWindow int) (*lnwallet.LightningChannel, *lnwa
CommitHeight: 0,
LocalBalance: lnwire.NewMSatFromSatoshis(channelBal),
RemoteBalance: lnwire.NewMSatFromSatoshis(channelBal),
FeePerKw: feePerKw,
FeePerKw: btcutil.Amount(feePerKw),
CommitFee: 8688,
CommitTx: bobCommitTx,
CommitSig: bytes.Repeat([]byte{1}, 71),