Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing uint to ulong for some plugins due to seconds to ms change #107

Merged
merged 3 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CoreMetrics/CoreMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void PostProcess(HttpContext context, string method, JArray _params, JObj
private JObject GetBlocksTime(uint nBlocks, uint lastHeight)
{
// It is currently limited to query blocks generated in the last 24hours (86400 seconds)
uint maxNBlocksPerDay = 86400 / Blockchain.SecondsPerBlock;
uint maxNBlocksPerDay = 86400 / Blockchain.MillisecondsPerBlock * 1000;
if (lastHeight != 0)
{
if (lastHeight >= Blockchain.Singleton.Height)
Expand Down
2 changes: 1 addition & 1 deletion CoreMetrics/CoreMetrics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00044" />
<PackageReference Include="Neo" Version="3.0.0-CI00122" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions RpcNep5Tracker/Nep5TransferKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Neo.Plugins
public class Nep5TransferKey : IComparable<Nep5TransferKey>, IEquatable<Nep5TransferKey>, ISerializable
{
public readonly UInt160 UserScriptHash;
public uint Timestamp { get; private set; }
public ulong Timestamp { get; private set; }
public readonly UInt160 AssetScriptHash;
public ushort BlockXferNotificationIndex { get; private set; }

Expand All @@ -17,7 +17,7 @@ public class Nep5TransferKey : IComparable<Nep5TransferKey>, IEquatable<Nep5Tran
{
}

public Nep5TransferKey(UInt160 userScriptHash, uint timestamp, UInt160 assetScriptHash, ushort xferIndex)
public Nep5TransferKey(UInt160 userScriptHash, ulong timestamp, UInt160 assetScriptHash, ushort xferIndex)
{
if (userScriptHash is null || assetScriptHash is null)
throw new ArgumentNullException();
Expand Down Expand Up @@ -82,7 +82,7 @@ public void Deserialize(BinaryReader reader)
byte[] timestampBytes = new byte[sizeof(uint)];
reader.Read(timestampBytes, 0, sizeof(uint));
if (BitConverter.IsLittleEndian) Array.Reverse(timestampBytes);
Timestamp = BitConverter.ToUInt32(timestampBytes, 0);
Timestamp = BitConverter.ToUInt64(timestampBytes, 0);
((ISerializable)AssetScriptHash).Deserialize(reader);
BlockXferNotificationIndex = reader.ReadUInt16();
}
Expand Down
2 changes: 1 addition & 1 deletion RpcNep5Tracker/RpcNep5Tracker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00044" />
<PackageReference Include="Neo" Version="3.0.0-CI00122" />
</ItemGroup>
</Project>