diff --git a/src/Nethermind.Verkle/Fields/FrEElement/Element.Arithmatic.cs b/src/Nethermind.Verkle/Fields/FrEElement/Element.Arithmatic.cs index f2ed4ed..b13be47 100644 --- a/src/Nethermind.Verkle/Fields/FrEElement/Element.Arithmatic.cs +++ b/src/Nethermind.Verkle/Fields/FrEElement/Element.Arithmatic.cs @@ -46,11 +46,9 @@ public static void AddMod(in FE a, in FE b, out FE res) // return; // } - if (!LessThanSubModulus(res)) - { - if (SubtractUnderflow(res, qElement, out res)) - throw new InvalidConstraintException("this should now be possible"); - } + if (LessThan(res, qElement)) return; + if (SubtractUnderflow(res, qElement, out res)) + throw new InvalidConstraintException("this should now be possible"); } public static void Divide(in FE x, in FE y, out FE z) diff --git a/src/Nethermind.Verkle/Nethermind.Verkle.csproj b/src/Nethermind.Verkle/Nethermind.Verkle.csproj index 7dcb001..254df78 100644 --- a/src/Nethermind.Verkle/Nethermind.Verkle.csproj +++ b/src/Nethermind.Verkle/Nethermind.Verkle.csproj @@ -9,7 +9,7 @@ - 0.2.1-alpha + 0.2.2-alpha Tanishq Jasoria Nethermind Demerzel Solutions Limited