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

Remove Debug.Assert #893

Merged
merged 3 commits into from
Jul 8, 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
4 changes: 0 additions & 4 deletions neo/Cryptography/ECC/ECFieldElement.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.Numerics;

Expand Down Expand Up @@ -47,8 +46,6 @@ private static BigInteger[] FastLucasSequence(BigInteger p, BigInteger P, BigInt
int n = k.GetBitLength();
int s = k.GetLowestSetBit();

Debug.Assert(k.TestBit(s));

BigInteger Uh = 1;
BigInteger Vl = 2;
BigInteger Vh = P;
Expand Down Expand Up @@ -131,7 +128,6 @@ public ECFieldElement Sqrt()
V += curve.Q;
}
V >>= 1;
Debug.Assert((V * V).Mod(curve.Q) == Value);
return new ECFieldElement(V, curve);
}
}
Expand Down
2 changes: 0 additions & 2 deletions neo/Cryptography/ECC/ECPoint.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Neo.IO;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
Expand Down Expand Up @@ -386,7 +385,6 @@ private static sbyte[] WindowNaf(sbyte width, BigInteger k)
{
if (x.Y.Equals(y.Y))
return x.Twice();
Debug.Assert(x.Y.Equals(-y.Y));
return x.Curve.Infinity;
}
ECFieldElement gamma = (y.Y - x.Y) / (y.X - x.X);
Expand Down