Add utxo banner
MODIFY
HiddenWallet.ChaumianTumbler/Controllers/TumblerController.cs
HiddenWallet.ChaumianTumbler/Controllers/TumblerController.cs
@@ -108,6 +108,11 @@ namespace HiddenWallet.ChaumianTumbler.Controllers
throw new ArgumentException("Input is already registered by another Alice");
}
+ if (Global.UtxoReferee.Utxos.Any(x => x.Hash == op.Hash && x.N == op.N))
+ {
+ throw new ArgumentException("Input is already registered by another Alice");
+ }
+
var txOutResponse = await Global.RpcClient.SendCommandAsync(RPCOperations.gettxout, op.Hash.ToString(), op.N, true);
// Check if inputs are unspent
if (txOutResponse.Result == null)

MODIFY
HiddenWallet.ChaumianTumbler/Program.cs
HiddenWallet.ChaumianTumbler/Program.cs
@@ -15,6 +15,7 @@ using System.Net;
using HiddenWallet.ChaumianTumbler.Store;
using System.Text;
using HiddenWallet.Crypto;
+using HiddenWallet.ChaumianTumbler.Referee;
namespace HiddenWallet.ChaumianTumbler
{
@@ -60,6 +61,15 @@ namespace HiddenWallet.ChaumianTumbler
Global.CoinJoinStore = new CoinJoinStore();
}
+ if (File.Exists(Global.UtxoRefereePath))
+ {
+ Global.UtxoReferee = await UtxoReferee.CreateFromFileAsync(Global.UtxoRefereePath);
+ }
+ else
+ {
+ Global.UtxoReferee = new UtxoReferee();
+ }
+
Global.StateMachine = new TumblerStateMachine();
Global.StateMachineJobCancel = new CancellationTokenSource();
Global.StateMachineJob = Global.StateMachine.StartAsync(Global.StateMachineJobCancel.Token);

Add utxo banner