mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
Do not include maxadditionalfeecontribution if there is no change. (#2007)
This commit is contained in:
parent
58f0ca3d8a
commit
067b977ec8
@ -109,10 +109,11 @@ namespace BTCPayServer.Services
|
||||
if (!signedPSBT.TryGetEstimatedFeeRate(out var originalFeeRate))
|
||||
throw new ArgumentException("signedPSBT should have utxo information", nameof(signedPSBT));
|
||||
var originalFee = signedPSBT.GetFee();
|
||||
optionalParameters.MaxAdditionalFeeContribution = MaxFeeBumpContribution is null ?
|
||||
// By default, we want to keep same fee rate and a single additional input
|
||||
originalFeeRate.GetFee(GetVirtualSize(inputScriptType)) :
|
||||
MaxFeeBumpContribution;
|
||||
if (changeOutput is PSBTOutput)
|
||||
optionalParameters.MaxAdditionalFeeContribution = MaxFeeBumpContribution is null ?
|
||||
// By default, we want to keep same fee rate and a single additional input
|
||||
originalFeeRate.GetFee(GetVirtualSize(inputScriptType)) :
|
||||
MaxFeeBumpContribution;
|
||||
if (MinimumFeeRate is FeeRate v)
|
||||
optionalParameters.MinFeeRate = v;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user