From fad6d4f952373690ef16ce27b0926c0ab762066a Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 14 Apr 2022 19:30:16 +0200 Subject: [PATCH] Remove not needed ArithToUint256 roundtrips in tests --- src/test/denialofservice_tests.cpp | 3 +-- src/test/pmt_tests.cpp | 15 +++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/test/denialofservice_tests.cpp b/src/test/denialofservice_tests.cpp index f03ff5ba3ad..441b2f773e7 100644 --- a/src/test/denialofservice_tests.cpp +++ b/src/test/denialofservice_tests.cpp @@ -4,7 +4,6 @@ // Unit tests for denial-of-service detection/prevention code -#include #include #include #include @@ -464,7 +463,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans) // ecdsa_signature_parse_der_lax are executed during this test. // Specifically branches that run only when an ECDSA // signature's R and S values have leading zeros. - g_insecure_rand_ctx = FastRandomContext(ArithToUint256(arith_uint256(33))); + g_insecure_rand_ctx = FastRandomContext{uint256{33}}; TxOrphanageTest orphanage; CKey key; diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp index a9d661438c3..3cbbec92d68 100644 --- a/src/test/pmt_tests.cpp +++ b/src/test/pmt_tests.cpp @@ -2,7 +2,6 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include #include #include #include @@ -107,13 +106,13 @@ BOOST_AUTO_TEST_CASE(pmt_test1) BOOST_AUTO_TEST_CASE(pmt_malleability) { - std::vector vTxid = { - ArithToUint256(1), ArithToUint256(2), - ArithToUint256(3), ArithToUint256(4), - ArithToUint256(5), ArithToUint256(6), - ArithToUint256(7), ArithToUint256(8), - ArithToUint256(9), ArithToUint256(10), - ArithToUint256(9), ArithToUint256(10), + std::vector vTxid{ + uint256{1}, uint256{2}, + uint256{3}, uint256{4}, + uint256{5}, uint256{6}, + uint256{7}, uint256{8}, + uint256{9}, uint256{10}, + uint256{9}, uint256{10}, }; std::vector vMatch = {false, false, false, false, false, false, false, false, false, true, true, false};