Skip to content

Commit 4621e7c

Browse files
committed
test: refactor: Rename extra_txn to const empty_extra_txn as it is empty in all test cases
1 parent f47cd64 commit 4621e7c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/test/blockencodings_tests.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <boost/test/unit_test.hpp>
1616

17-
std::vector<CTransactionRef> extra_txn;
17+
const std::vector<CTransactionRef> empty_extra_txn;
1818

1919
BOOST_FIXTURE_TEST_SUITE(blockencodings_tests, RegTestingSetup)
2020

@@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE(SimpleRoundTripTest)
7575
stream >> shortIDs2;
7676

7777
PartiallyDownloadedBlock partialBlock(&pool);
78-
BOOST_CHECK(partialBlock.InitData(shortIDs2, extra_txn) == READ_STATUS_OK);
78+
BOOST_CHECK(partialBlock.InitData(shortIDs2, empty_extra_txn) == READ_STATUS_OK);
7979
BOOST_CHECK( partialBlock.IsTxAvailable(0));
8080
BOOST_CHECK(!partialBlock.IsTxAvailable(1));
8181
BOOST_CHECK( partialBlock.IsTxAvailable(2));
@@ -165,7 +165,7 @@ BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest)
165165
stream >> shortIDs2;
166166

167167
PartiallyDownloadedBlock partialBlock(&pool);
168-
BOOST_CHECK(partialBlock.InitData(shortIDs2, extra_txn) == READ_STATUS_OK);
168+
BOOST_CHECK(partialBlock.InitData(shortIDs2, empty_extra_txn) == READ_STATUS_OK);
169169
BOOST_CHECK(!partialBlock.IsTxAvailable(0));
170170
BOOST_CHECK( partialBlock.IsTxAvailable(1));
171171
BOOST_CHECK( partialBlock.IsTxAvailable(2));
@@ -235,7 +235,7 @@ BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest)
235235
stream >> shortIDs2;
236236

237237
PartiallyDownloadedBlock partialBlock(&pool);
238-
BOOST_CHECK(partialBlock.InitData(shortIDs2, extra_txn) == READ_STATUS_OK);
238+
BOOST_CHECK(partialBlock.InitData(shortIDs2, empty_extra_txn) == READ_STATUS_OK);
239239
BOOST_CHECK( partialBlock.IsTxAvailable(0));
240240
BOOST_CHECK( partialBlock.IsTxAvailable(1));
241241
BOOST_CHECK( partialBlock.IsTxAvailable(2));
@@ -290,7 +290,7 @@ BOOST_AUTO_TEST_CASE(EmptyBlockRoundTripTest)
290290
stream >> shortIDs2;
291291

292292
PartiallyDownloadedBlock partialBlock(&pool);
293-
BOOST_CHECK(partialBlock.InitData(shortIDs2, extra_txn) == READ_STATUS_OK);
293+
BOOST_CHECK(partialBlock.InitData(shortIDs2, empty_extra_txn) == READ_STATUS_OK);
294294
BOOST_CHECK(partialBlock.IsTxAvailable(0));
295295

296296
CBlock block2;

0 commit comments

Comments
 (0)