Commit 25670725 authored by Jeremy Bokobza's avatar Jeremy Bokobza

Added feerate for the tumbler client transactions

parent 398ec79f
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Text;
using NBitcoin;
using NTumbleBit;
using Stratis.Bitcoin.MemoryPool;
namespace Breeze.TumbleBit.Client
{
......@@ -33,7 +34,20 @@ namespace Breeze.TumbleBit.Client
public FeeRate GetFeeRate()
{
return null;
decimal relayFee = MempoolValidator.MinRelayTxFee.FeePerK.ToUnit(MoneyUnit.BTC);
var minimumRate = new FeeRate(Money.Coins(relayFee * 2), 1000); //0.00002000 BTC/kB
var fallbackFeeRate = new FeeRate(Money.Satoshis(50), 1); //0.00050000 BTC/kB
// TODO add real fee estimation
//var rate = _RPCClient.TryEstimateFeeRate(1) ??
// _RPCClient.TryEstimateFeeRate(2) ??
// _RPCClient.TryEstimateFeeRate(3) ??
// FallBackFeeRate;
//if (rate < MinimumFeeRate)
// rate = MinimumFeeRa
return fallbackFeeRate;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment