From 4b12a8069f831d0952594ced5ff8767aa7e3d1d6 Mon Sep 17 00:00:00 2001 From: daniel <4954577+jaensen@users.noreply.github.com> Date: Mon, 4 Nov 2024 19:40:44 +0100 Subject: [PATCH] * use nethermind 1.29.1 --- .../Circles.Index.CirclesV1.csproj | 2 +- .../Circles.Index.CirclesV2.csproj | 2 +- .../Circles.Index.Common.csproj | 2 +- .../Circles.Index.Query.Tests.csproj | 4 +-- Circles.Index.Rpc/Circles.Index.Rpc.csproj | 2 +- Circles.Index/Circles.Index.csproj | 4 +-- .../Circles.Pathfinder.Tests.csproj | 30 +++++++++++++++++++ Circles.Pathfinder.Tests/Pathfinder.cs | 25 ++++++++++++++++ Circles.sln | 6 ++++ arm64.Dockerfile | 2 +- x64.Dockerfile | 2 +- x64.debug.Dockerfile | 2 +- x64.debug.spaceneth.Dockerfile | 2 +- 13 files changed, 73 insertions(+), 12 deletions(-) create mode 100644 Circles.Pathfinder.Tests/Circles.Pathfinder.Tests.csproj create mode 100644 Circles.Pathfinder.Tests/Pathfinder.cs diff --git a/Circles.Index.CirclesV1/Circles.Index.CirclesV1.csproj b/Circles.Index.CirclesV1/Circles.Index.CirclesV1.csproj index 61c18e3..6367995 100644 --- a/Circles.Index.CirclesV1/Circles.Index.CirclesV1.csproj +++ b/Circles.Index.CirclesV1/Circles.Index.CirclesV1.csproj @@ -8,7 +8,7 @@ - + diff --git a/Circles.Index.CirclesV2/Circles.Index.CirclesV2.csproj b/Circles.Index.CirclesV2/Circles.Index.CirclesV2.csproj index a8b5f2d..51b4c88 100644 --- a/Circles.Index.CirclesV2/Circles.Index.CirclesV2.csproj +++ b/Circles.Index.CirclesV2/Circles.Index.CirclesV2.csproj @@ -14,7 +14,7 @@ - + diff --git a/Circles.Index.Common/Circles.Index.Common.csproj b/Circles.Index.Common/Circles.Index.Common.csproj index 041005e..af1b693 100644 --- a/Circles.Index.Common/Circles.Index.Common.csproj +++ b/Circles.Index.Common/Circles.Index.Common.csproj @@ -8,7 +8,7 @@ - + diff --git a/Circles.Index.Query.Tests/Circles.Index.Query.Tests.csproj b/Circles.Index.Query.Tests/Circles.Index.Query.Tests.csproj index b2549b2..6bfcb08 100644 --- a/Circles.Index.Query.Tests/Circles.Index.Query.Tests.csproj +++ b/Circles.Index.Query.Tests/Circles.Index.Query.Tests.csproj @@ -14,8 +14,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Circles.Index.Rpc/Circles.Index.Rpc.csproj b/Circles.Index.Rpc/Circles.Index.Rpc.csproj index b4070e2..b62210c 100644 --- a/Circles.Index.Rpc/Circles.Index.Rpc.csproj +++ b/Circles.Index.Rpc/Circles.Index.Rpc.csproj @@ -8,7 +8,7 @@ - + diff --git a/Circles.Index/Circles.Index.csproj b/Circles.Index/Circles.Index.csproj index f853788..e42af8f 100644 --- a/Circles.Index/Circles.Index.csproj +++ b/Circles.Index/Circles.Index.csproj @@ -21,9 +21,9 @@ - + - + diff --git a/Circles.Pathfinder.Tests/Circles.Pathfinder.Tests.csproj b/Circles.Pathfinder.Tests/Circles.Pathfinder.Tests.csproj new file mode 100644 index 0000000..bb1a28e --- /dev/null +++ b/Circles.Pathfinder.Tests/Circles.Pathfinder.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + + + + + + + + + + + + + + diff --git a/Circles.Pathfinder.Tests/Pathfinder.cs b/Circles.Pathfinder.Tests/Pathfinder.cs new file mode 100644 index 0000000..d743b63 --- /dev/null +++ b/Circles.Pathfinder.Tests/Pathfinder.cs @@ -0,0 +1,25 @@ +using Circles.Pathfinder.Data; +using Circles.Pathfinder.DTOs; +using Circles.Pathfinder.Graphs; + +namespace Circles.Pathfinder.Tests; + +[TestFixture] +public class PathfinderTests +{ + [Test] + public async Task FindPath() + { + var loadGraph = new LoadGraph("Host=localhost;Port=5432;Database=postgres;Username=postgres;Password=postgres"); + var graphFactory = new GraphFactory(); + var pathfinder = new V2Pathfinder(loadGraph, graphFactory); + var flowRequest = new FlowRequest + { + Source = "0x32e69894af3a7d1124baa2d9f1fcd38d9d58fe4a", + Sink = "0x43e96201714514f9a1dd5bd9fbe3f01c329af95a", + TargetFlow = "9999999999999999999999999999999999999999" + }; + var result = await pathfinder.ComputeMaxFlow(flowRequest); + Assert.That(result.MaxFlow, Is.Not.EqualTo("0")); + } +} \ No newline at end of file diff --git a/Circles.sln b/Circles.sln index 4fe7154..6114a4c 100644 --- a/Circles.sln +++ b/Circles.sln @@ -61,6 +61,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "protobuf-types", "protobuf- EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Circles.Pathfinder", "Circles.Pathfinder\Circles.Pathfinder.csproj", "{756580B1-2D2A-4FFE-9711-046A10853003}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Circles.Pathfinder.Tests", "Circles.Pathfinder.Tests\Circles.Pathfinder.Tests.csproj", "{62AB2354-6098-4C31-8C85-CFE07E704F93}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -119,6 +121,10 @@ Global {756580B1-2D2A-4FFE-9711-046A10853003}.Debug|Any CPU.Build.0 = Debug|Any CPU {756580B1-2D2A-4FFE-9711-046A10853003}.Release|Any CPU.ActiveCfg = Release|Any CPU {756580B1-2D2A-4FFE-9711-046A10853003}.Release|Any CPU.Build.0 = Release|Any CPU + {62AB2354-6098-4C31-8C85-CFE07E704F93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62AB2354-6098-4C31-8C85-CFE07E704F93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62AB2354-6098-4C31-8C85-CFE07E704F93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62AB2354-6098-4C31-8C85-CFE07E704F93}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {2B7D2126-6D6F-4A5B-81A1-3E5F1A9645F6} = {64189094-62E5-48CA-BD66-1A7B82263BA8} diff --git a/arm64.Dockerfile b/arm64.Dockerfile index d82e820..721bc31 100644 --- a/arm64.Dockerfile +++ b/arm64.Dockerfile @@ -6,7 +6,7 @@ COPY . . RUN dotnet restore RUN dotnet publish -c Release -o /circles-nethermind-plugin -FROM nethermind/nethermind:1.28.0 AS base +FROM nethermind/nethermind:1.29.1 AS base # dotnet libs COPY --from=build /circles-nethermind-plugin/Circles.Index.deps.json /nethermind/plugins diff --git a/x64.Dockerfile b/x64.Dockerfile index 11c24db..7529c08 100644 --- a/x64.Dockerfile +++ b/x64.Dockerfile @@ -6,7 +6,7 @@ COPY . . RUN dotnet restore RUN dotnet publish -c Release -o /circles-nethermind-plugin -FROM nethermind/nethermind:1.28.0 AS base +FROM nethermind/nethermind:1.29.1 AS base # dotnet libs COPY --from=build /circles-nethermind-plugin/Circles.Index.deps.json /nethermind/plugins diff --git a/x64.debug.Dockerfile b/x64.debug.Dockerfile index c6ee674..af4d277 100644 --- a/x64.debug.Dockerfile +++ b/x64.debug.Dockerfile @@ -6,7 +6,7 @@ COPY . . RUN dotnet restore RUN dotnet publish -c Debug -o /circles-nethermind-plugin -FROM nethermind/nethermind:1.28.0 AS base +FROM nethermind/nethermind:1.29.1 AS base # dotnet libs COPY --from=build /circles-nethermind-plugin/Circles.Index.deps.json /nethermind/plugins diff --git a/x64.debug.spaceneth.Dockerfile b/x64.debug.spaceneth.Dockerfile index 9c18c0f..5c9e05f 100644 --- a/x64.debug.spaceneth.Dockerfile +++ b/x64.debug.spaceneth.Dockerfile @@ -6,7 +6,7 @@ COPY . . RUN dotnet restore RUN dotnet publish -c Debug -o /circles-nethermind-plugin -FROM nethermind/nethermind:1.28.0 AS base +FROM nethermind/nethermind:1.29.1 AS base # dotnet libs COPY --from=build /circles-nethermind-plugin/Circles.Index.deps.json /nethermind/plugins