mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
75bf8a5086
* Use Mempoolspace fees Since bitcoind's fee estiomates are horrible, I would use an altenrative, but that adds a third party to the mix. We can either: * Accept the risk (it is only for fee estimation anyway) * Offer a toggle in the server settings * Move this code to a plugin * refactor * Refactor --------- Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
19 lines
382 B
C#
19 lines
382 B
C#
using System.Threading.Tasks;
|
|
using NBitcoin;
|
|
|
|
namespace BTCPayServer.Services.Fees;
|
|
|
|
public class StaticFeeProvider : IFeeProvider
|
|
{
|
|
private readonly FeeRate _feeRate;
|
|
|
|
public StaticFeeProvider(FeeRate feeRate)
|
|
{
|
|
_feeRate = feeRate;
|
|
}
|
|
|
|
public Task<FeeRate> GetFeeRateAsync(int blockTarget = 20)
|
|
{
|
|
return Task.FromResult(_feeRate);
|
|
}
|
|
} |