Implement TryEstimateSmartFeeAsync to fix backend
MODIFY
WalletWasabi.Tests/UnitTests/MockRpcClient.cs
WalletWasabi.Tests/UnitTests/MockRpcClient.cs
@@ -20,110 +20,142 @@ namespace WalletWasabi.Tests.UnitTests
{
return OnGetBestBlockHashAsync();
}
+
public Task<Block> GetBlockAsync(uint256 blockId)
{
return OnGetBlockAsync(blockId);
}
+
public Task<Block> GetBlockAsync(uint blockHeight)
{
throw new NotImplementedException();
}
+
public Task<BlockchainInfo> GetBlockchainInfoAsync()
{
throw new NotImplementedException();
}
+
public Task<int> GetBlockCountAsync()
{
throw new NotImplementedException();
}
+
public Task<uint256> GetBlockHashAsync(int height)
{
throw new NotImplementedException();
}
+
public Task<BlockHeader> GetBlockHeaderAsync(uint256 blockHash)
{
return OnGetBlockHeaderAsync(blockHash);
}
+
public Task<MempoolEntry> GetMempoolEntryAsync(uint256 txid, bool throwIfNotFound = true)
{
throw new NotImplementedException();
}
+
public Task<BitcoinAddress> GetNewAddressAsync()
{
throw new NotImplementedException();
}
+
public Task<PeerInfo[]> GetPeersInfoAsync()
{
throw new NotImplementedException();
}
+
public Task<uint256[]> GetRawMempoolAsync()
{
throw new NotImplementedException();
}
+
public Task<Transaction> GetRawTransactionAsync(uint256 txid, bool throwIfNotFound = true)
{
throw new NotImplementedException();
}
+
public GetTxOutResponse GetTxOut(uint256 txid, int index, bool includeMempool = true)
{
throw new NotImplementedException();
}
+
public Task<GetTxOutResponse> GetTxOutAsync(uint256 txid, int index, bool includeMempool = true)
{
throw new NotImplementedException();
}
+
public Task InvalidateBlockAsync(uint256 blockHash)
{
throw new NotImplementedException();
}
+
public Task<UnspentCoin[]> ListUnspentAsync()
{
throw new NotImplementedException();
}
+
public IRPCClient PrepareBatch()
{
throw new NotImplementedException();
}
+
public Task SendBatchAsync()
{
throw new NotImplementedException();
}
+
+ public Task<EstimateSmartFeeResponse> TryEstimateSmartFeeAsync(int confirmationTarget, EstimateSmartFeeMode estimateMode = EstimateSmartFeeMode.Conservative)
+ {
+ throw new NotImplementedException();
+ }
+
public Task<uint256> SendRawTransactionAsync(Transaction transaction)
{
throw new NotImplementedException();
}
+
public Task<uint256> SendToAddressAsync(BitcoinAddress address, Money amount, string commentTx = null, string commentDest = null, bool subtractFeeFromAmount = false, bool replaceable = false)
{
throw new NotImplementedException();
}
+
public Task<SignRawTransactionResponse> SignRawTransactionWithWalletAsync(SignRawTransactionRequest request)
{
throw new NotImplementedException();
}
+
public Task StopAsync()
{
throw new NotImplementedException();
}
+
public Task<MempoolAcceptResult> TestMempoolAcceptAsync(Transaction transaction, bool allowHighFees = false)
{
throw new NotImplementedException();
}
+
public Task<TimeSpan> UptimeAsync()
{
throw new NotImplementedException();
}
+
public Task AbandonTransactionAsync(uint256 txid)
{
throw new NotImplementedException();
}
+
public Task<BumpResponse> BumpFeeAsync(uint256 txid)
{
throw new NotImplementedException();
}
+
public Task<uint256[]> GenerateAsync(int blockCount)
{
throw new NotImplementedException();
}
+
public Task<EstimateSmartFeeResponse> EstimateSmartFeeAsync(int confirmationTarget, EstimateSmartFeeMode estimateMode = EstimateSmartFeeMode.Conservative)
{
throw new NotImplementedException();

MODIFY
WalletWasabi/BitcoinCore/IRPCClient.cs
WalletWasabi/BitcoinCore/IRPCClient.cs
@@ -25,6 +25,7 @@ namespace WalletWasabi.BitcoinCore
Task<BlockchainInfo> GetBlockchainInfoAsync();
Task<PeerInfo[]> GetPeersInfoAsync();
+
Task<TimeSpan> UptimeAsync();
Task<uint256> SendRawTransactionAsync(Transaction transaction);
@@ -64,5 +65,7 @@ namespace WalletWasabi.BitcoinCore
Task<UnspentCoin[]> ListUnspentAsync();
Task SendBatchAsync();
+
+ Task<EstimateSmartFeeResponse> TryEstimateSmartFeeAsync(int confirmationTarget, EstimateSmartFeeMode estimateMode = EstimateSmartFeeMode.Conservative);
}
}

MODIFY
WalletWasabi/BitcoinCore/RpcClientBase.cs
WalletWasabi/BitcoinCore/RpcClientBase.cs
@@ -161,6 +161,11 @@ namespace WalletWasabi.BitcoinCore
await Rpc.SendBatchAsync().ConfigureAwait(false);
}
+ public Task<EstimateSmartFeeResponse> TryEstimateSmartFeeAsync(int confirmationTarget, EstimateSmartFeeMode estimateMode = EstimateSmartFeeMode.Conservative)
+ {
+ return Rpc.TryEstimateSmartFeeAsync(confirmationTarget, estimateMode: estimateMode);
+ }
+
#endregion For Testing Only
}
}

Implement TryEstimateSmartFeeAsync to fix backend