diff --git a/IpfsCli/IpfsCli.csproj b/IpfsCli/IpfsCli.csproj
index 341ba8dd..c2233df0 100644
--- a/IpfsCli/IpfsCli.csproj
+++ b/IpfsCli/IpfsCli.csproj
@@ -13,7 +13,7 @@
true
true
true
-
+
*.pdb;
*.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/IpfsServer/HttpApi/V0/SwamController.cs b/IpfsServer/HttpApi/V0/SwamController.cs
index 74f737dc..93907a36 100644
--- a/IpfsServer/HttpApi/V0/SwamController.cs
+++ b/IpfsServer/HttpApi/V0/SwamController.cs
@@ -51,7 +51,7 @@ public ConnectedPeerDto(Peer peer)
{
Peer = peer.Id.ToString();
Addr = peer.ConnectedAddress?.WithoutPeerId().ToString();
- Latency = peer.Latency == null ? string.Empty : Duration.Stringify(peer.Latency.Value, string.Empty);
+ Latency = peer.Latency == null ? "n/a" : Duration.Stringify(peer.Latency.Value, string.Empty);
}
}
diff --git a/IpfsServer/IpfsServer.csproj b/IpfsServer/IpfsServer.csproj
index 53301a8a..92313e77 100644
--- a/IpfsServer/IpfsServer.csproj
+++ b/IpfsServer/IpfsServer.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/src/CoreApi/GenericApi.cs b/src/CoreApi/GenericApi.cs
index 8f321d62..0a910296 100644
--- a/src/CoreApi/GenericApi.cs
+++ b/src/CoreApi/GenericApi.cs
@@ -27,7 +27,7 @@ public GenericApi(IpfsEngine ipfs)
return await ipfs.Dht.FindPeerAsync(peer, cancel).ConfigureAwait(false);
}
- public async Task ResolveAsync(string name, bool recursive = false, CancellationToken cancel = default(CancellationToken))
+ public async Task ResolveAsync(string name, bool recursive = true, CancellationToken cancel = default(CancellationToken))
{
var path = name;
if (path.StartsWith("/ipns/"))
diff --git a/src/CoreApi/SwarmApi.cs b/src/CoreApi/SwarmApi.cs
index d9acb861..8d7dbf72 100644
--- a/src/CoreApi/SwarmApi.cs
+++ b/src/CoreApi/SwarmApi.cs
@@ -97,12 +97,7 @@ public SwarmApi(IpfsEngine ipfs)
var strings = addrs.Select(a => a.ToString());
await ipfs.Config.SetAsync("Swarm.AddrFilters", JToken.FromObject(strings), cancel).ConfigureAwait(false);
- var bag = new WhiteList();
- foreach (var a in addrs)
- {
- bag.Add(a);
- }
- (await ipfs.SwarmService.ConfigureAwait(false)).WhiteList = bag;
+ (await ipfs.SwarmService.ConfigureAwait(false)).WhiteList.Remove(address);
return address;
}
diff --git a/src/IpfsEngine.cs b/src/IpfsEngine.cs
index f9d9c26d..0709c84a 100644
--- a/src/IpfsEngine.cs
+++ b/src/IpfsEngine.cs
@@ -382,6 +382,13 @@ await MigrationManager.MirgrateToVersionAsync(MigrationManager.LatestVersion)
});
await swarm.StartAsync().ConfigureAwait(false);
+ var peerManager = new PeerManager { Swarm = swarm };
+ await peerManager.StartAsync().ConfigureAwait(false);
+ stopTasks.Add(async () =>
+ {
+ await peerManager.StopAsync().ConfigureAwait(false);
+ });
+
// Start the primary services.
var tasks = new List>
{
diff --git a/src/IpfsEngine.csproj b/src/IpfsEngine.csproj
index aa8f80d1..dfcb04f9 100644
--- a/src/IpfsEngine.csproj
+++ b/src/IpfsEngine.csproj
@@ -50,11 +50,11 @@
-
+
-
+
diff --git a/test/CoreApi/GenericApiTest.cs b/test/CoreApi/GenericApiTest.cs
index 517aeb95..b8796c84 100644
--- a/test/CoreApi/GenericApiTest.cs
+++ b/test/CoreApi/GenericApiTest.cs
@@ -34,7 +34,7 @@ public async Task Mars_Info()
var marsAddr = $"/ip6/::1/p2p/{marsId}";
var ipfs = TestFixture.Ipfs;
var swarm = await ipfs.SwarmService;
- var mars = await swarm.RegisterPeerAsync(marsAddr);
+ var mars = swarm.RegisterPeerAddress(marsAddr);
var peer = await ipfs.Generic.IdAsync(marsId);
Assert.AreEqual(mars.Id, peer.Id);