Skip to content

Commit

Permalink
Revert "* fix missing ToUTC in static circles conversion"
Browse files Browse the repository at this point in the history
This reverts commit cf3e641.
  • Loading branch information
jaensen committed Dec 13, 2024
1 parent cf3e641 commit 19ebe9d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Circles.Index.Utils/ConversionUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public abstract class ConversionUtils

public static long ConvertToUnixTimestamp(DateTime dateTime)
{
DateTimeOffset dateTimeOffset = dateTime;
return dateTimeOffset.ToUnixTimeMilliseconds();
DateTime unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
return (long)(dateTime - unixEpoch).TotalMilliseconds;
}

public static decimal GetCrcPayoutAt(long timestamp)
Expand Down Expand Up @@ -100,7 +100,7 @@ public static decimal CirclesToStaticCircles(decimal circlesBalance, DateTime la
/// <returns></returns>
public static decimal StaticCirclesToCircles(decimal staticCirclesBalance)
{
var lastUpdate = DateTime.Now.ToUniversalTime();
var lastUpdate = DateTime.Now;
var lastUpdateDay = (lastUpdate - CirclesInceptionDate).TotalDays;
var f = (decimal)Math.Pow((double)Beta, lastUpdateDay);
return staticCirclesBalance / f;
Expand Down
4 changes: 2 additions & 2 deletions Circles.Index/Circles.Index.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Authors>Daniel Janz (Gnosis Service GmbH)</Authors>
<Copyright>Gnosis Service GmbH</Copyright>
<Product>Circles</Product>
<AssemblyVersion>1.11.4</AssemblyVersion>
<FileVersion>1.11.4</FileVersion>
<AssemblyVersion>1.11.3</AssemblyVersion>
<FileVersion>1.11.3</FileVersion>
</PropertyGroup>


Expand Down
2 changes: 1 addition & 1 deletion arm64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY . .
RUN dotnet restore
RUN dotnet publish -c Release -o /circles-nethermind-plugin

FROM nethermind/nethermind:1.30.1 AS base
FROM nethermind/nethermind:1.29.1 AS base

# dotnet libs
COPY --from=build /circles-nethermind-plugin/Circles.Index.deps.json /nethermind/plugins
Expand Down
2 changes: 1 addition & 1 deletion x64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY . .
RUN dotnet restore
RUN dotnet publish -c Release -o /circles-nethermind-plugin

FROM nethermind/nethermind:1.30.1 AS base
FROM nethermind/nethermind:1.29.1 AS base

# dotnet libs
COPY --from=build /circles-nethermind-plugin/Circles.Index.deps.json /nethermind/plugins
Expand Down
2 changes: 1 addition & 1 deletion x64.debug.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY . .
RUN dotnet restore
RUN dotnet publish -c Debug -o /circles-nethermind-plugin

FROM nethermind/nethermind:1.30.1 AS base
FROM nethermind/nethermind:1.29.1 AS base

# dotnet libs
COPY --from=build /circles-nethermind-plugin/Circles.Index.deps.json /nethermind/plugins
Expand Down
2 changes: 1 addition & 1 deletion x64.debug.spaceneth.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY . .
RUN dotnet restore
RUN dotnet publish -c Debug -o /circles-nethermind-plugin

FROM nethermind/nethermind:1.30.1 AS base
FROM nethermind/nethermind:1.29.1 AS base

# dotnet libs
COPY --from=build /circles-nethermind-plugin/Circles.Index.deps.json /nethermind/plugins
Expand Down

0 comments on commit 19ebe9d

Please sign in to comment.