Skip to content

Commit fad6d4f

Browse files
author
MarcoFalke
committed
Remove not needed ArithToUint256 roundtrips in tests
1 parent fa456cc commit fad6d4f

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/test/denialofservice_tests.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
// Unit tests for denial-of-service detection/prevention code
66

7-
#include <arith_uint256.h>
87
#include <banman.h>
98
#include <chainparams.h>
109
#include <net.h>
@@ -464,7 +463,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
464463
// ecdsa_signature_parse_der_lax are executed during this test.
465464
// Specifically branches that run only when an ECDSA
466465
// signature's R and S values have leading zeros.
467-
g_insecure_rand_ctx = FastRandomContext(ArithToUint256(arith_uint256(33)));
466+
g_insecure_rand_ctx = FastRandomContext{uint256{33}};
468467

469468
TxOrphanageTest orphanage;
470469
CKey key;

src/test/pmt_tests.cpp

+7-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <arith_uint256.h>
65
#include <consensus/merkle.h>
76
#include <merkleblock.h>
87
#include <serialize.h>
@@ -107,13 +106,13 @@ BOOST_AUTO_TEST_CASE(pmt_test1)
107106

108107
BOOST_AUTO_TEST_CASE(pmt_malleability)
109108
{
110-
std::vector<uint256> vTxid = {
111-
ArithToUint256(1), ArithToUint256(2),
112-
ArithToUint256(3), ArithToUint256(4),
113-
ArithToUint256(5), ArithToUint256(6),
114-
ArithToUint256(7), ArithToUint256(8),
115-
ArithToUint256(9), ArithToUint256(10),
116-
ArithToUint256(9), ArithToUint256(10),
109+
std::vector<uint256> vTxid{
110+
uint256{1}, uint256{2},
111+
uint256{3}, uint256{4},
112+
uint256{5}, uint256{6},
113+
uint256{7}, uint256{8},
114+
uint256{9}, uint256{10},
115+
uint256{9}, uint256{10},
117116
};
118117
std::vector<bool> vMatch = {false, false, false, false, false, false, false, false, false, true, true, false};
119118

0 commit comments

Comments
 (0)