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

Upgrade intx to v0.11.0 #967

Merged
merged 1 commit into from
Aug 6, 2024
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
6 changes: 3 additions & 3 deletions cmake/Hunter/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ hunter_cmake_args(

hunter_config(
intx
VERSION 0.10.0
URL https://github.com/chfast/intx/archive/v0.10.1.tar.gz
SHA1 168e0c2ff6760bd6467e25523cc0e68447358018
VERSION 0.11.0
URL https://github.com/chfast/intx/archive/v0.11.0.tar.gz
SHA1 025fe6e95e7066b49e6bb3deff597a24442312ff
)
14 changes: 8 additions & 6 deletions test/unittests/evmmax_secp256k1_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TEST(secp256k1, field_inv)
{
const evmmax::ModArith m{FieldPrime};

for (const auto& t : {
for (const auto& t : std::array{
1_u256,
0x6e140df17432311190232a91a38daed3ee9ed7f038645dd0278da7ca6e497de_u256,
FieldPrime - 1,
Expand All @@ -32,7 +32,7 @@ TEST(secp256k1, field_sqrt)
{
const evmmax::ModArith m{FieldPrime};

for (const auto& t : {
for (const auto& t : std::array{
1_u256,
0x6e140df17432311190232a91a38daed3ee9ed7f038645dd0278da7ca6e497de_u256,
0xf3b9accc43dc8919ba3b4f1e14c8f7c72e7c4c013a404e9fd35e9c9a5b7b228_u256,
Expand Down Expand Up @@ -60,7 +60,7 @@ TEST(secp256k1, field_sqrt_invalid)
{
const evmmax::ModArith m{FieldPrime};

for (const auto& t : {3_u256, FieldPrime - 1})
for (const auto& t : std::array{3_u256, FieldPrime - 1})
{
EXPECT_FALSE(field_sqrt(m, m.to_mont(t)).has_value());
}
Expand All @@ -70,7 +70,7 @@ TEST(secp256k1, scalar_inv)
{
const evmmax::ModArith n{Order};

for (const auto& t : {
for (const auto& t : std::array{
1_u256,
0x6e140df17432311190232a91a38daed3ee9ed7f038645dd0278da7ca6e497de_u256,
Order - 1,
Expand Down Expand Up @@ -131,8 +131,10 @@ TEST(secp256k1, calculate_y_invalid)
{
const evmmax::ModArith m{FieldPrime};

for (const auto& t :
{0x207ea538f1835f6de40c793fc23d22b14da5a80015a0fecddf56f146b21d7949_u256, FieldPrime - 1})
for (const auto& t : std::array{
0x207ea538f1835f6de40c793fc23d22b14da5a80015a0fecddf56f146b21d7949_u256,
FieldPrime - 1,
})
{
const auto x = m.to_mont(t);

Expand Down