input+lnwallet: apply the new type lntypes.VByte

This commit is contained in:
yyforyongyu
2024-05-24 23:03:51 +08:00
parent 8da68bb7db
commit 17a089c899
2 changed files with 10 additions and 9 deletions

View File

@@ -42,7 +42,7 @@ type SatPerKVByte btcutil.Amount
// FeeForVSize calculates the fee resulting from this fee rate and the given
// vsize in vbytes.
func (s SatPerKVByte) FeeForVSize(vbytes int64) btcutil.Amount {
func (s SatPerKVByte) FeeForVSize(vbytes lntypes.VByte) btcutil.Amount {
return btcutil.Amount(s) * btcutil.Amount(vbytes) / 1000
}
@@ -73,7 +73,7 @@ func (s SatPerKWeight) FeeForWeight(wu lntypes.WeightUnit) btcutil.Amount {
// FeeForVByte calculates the fee resulting from this fee rate and the given
// size in vbytes (vb).
func (s SatPerKWeight) FeeForVByte(vb int64) btcutil.Amount {
func (s SatPerKWeight) FeeForVByte(vb lntypes.VByte) btcutil.Amount {
return s.FeePerKVByte().FeeForVSize(vb)
}