Implement MemPoolService
MODIFY
MagicalCryptoWallet/MagicalCryptoWallet.csproj
MagicalCryptoWallet/MagicalCryptoWallet.csproj
</PropertyGroup>
<ItemGroup>
+ <PackageReference Include="ConcurrentHashSet" Version="1.0.2" />
<PackageReference Include="NBitcoin" Version="4.0.0.54" />
<PackageReference Include="Nito.AsyncEx.Coordination" Version="1.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />

MODIFY
MagicalCryptoWallet/Services/WalletService.cs
MagicalCryptoWallet/Services/WalletService.cs
@@ -30,9 +30,11 @@ namespace MagicalCryptoWallet.Services
// He has a GetAddressManager(), which always looks for AddressManager inside ConnectionParameters.TemplateBehaviors
// Not sure if I had a reason to do this, or I just used Nicolas's legacy
// ToDo: Does it work with RegTest? Or at least acts like it does.
- public AddressManager AddressManager { get; private set; }
+ public AddressManager AddressManager { get; set; }
- public NodesGroup Nodes { get; private set; }
+ public NodesGroup Nodes { get; set; }
+
+ public MemPoolService MemPoolService { get; }
#endregion
@@ -62,6 +64,8 @@ namespace MagicalCryptoWallet.Services
//So we find nodes faster
ConnectionParameters.TemplateBehaviors.Add(new AddressManagerBehavior(AddressManager));
+ MemPoolService = new MemPoolService();
+ ConnectionParameters.TemplateBehaviors.Add(new MemPoolBehavior(MemPoolService));
Nodes = new NodesGroup(Network, ConnectionParameters,
new NodeRequirement

Implement MemPoolService