Skip to content

Commit

Permalink
Implement TestMempoolAcceptAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
nopara73 committed Dec 12, 2018
1 parent 0c4dc22 commit b86d03d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions WalletWasabi/Extensions/RPCClientExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WalletWasabi.Logging;
using WalletWasabi.Models;
Expand Down Expand Up @@ -114,5 +117,12 @@ private static EstimateSmartFeeResponse SimulateRegTestFeeEstimation(int confirm
var resp = new EstimateSmartFeeResponse { Blocks = confirmationTarget, FeeRate = feeRate };
return resp;
}

public static async Task<RPCResponse> TestMempoolAcceptAsync(this RPCClient rpc, bool allowHighFees, params Transaction[] transactions)
{
RPCResponse resp = await rpc.SendCommandAsync("testmempoolaccept", transactions.Select(x => x.ToHex()).ToArray(), allowHighFees);

return resp;
}
}
}
2 changes: 1 addition & 1 deletion WalletWasabi/Services/WalletService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public async Task InitializeAsync(CancellationToken cancel)
}
}
}
catch(Exception ex)
catch (Exception ex)
{
Logger.LogWarning<WalletService>(ex);
}
Expand Down

0 comments on commit b86d03d

Please sign in to comment.