Skip to content

Commit d9de00b

Browse files
committed
Merge #20105: [net] Remove CombinerAll
1afcd41 [net] Remove CombinerAll (John Newbery) Pull request description: This was introduced in 9519a9a for use with boost signals. Boost signals have not been used in net since 8ad663c, so this code is unused. ACKs for top commit: MarcoFalke: review ACK 1afcd41 laanwj: code review ACK 1afcd41 Tree-SHA512: a4313142afb88bf12f15abc4e717b3b0d0b40d2d5db2638494af3181e1cd680d7b036087050fc0e0dfe606228849a2e20ae85135908a9ebe8ff2130f163920e1
2 parents 392c6f4 + 1afcd41 commit d9de00b

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

src/net.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -595,21 +595,6 @@ void InterruptMapPort();
595595
void StopMapPort();
596596
uint16_t GetListenPort();
597597

598-
struct CombinerAll
599-
{
600-
typedef bool result_type;
601-
602-
template<typename I>
603-
bool operator()(I first, I last) const
604-
{
605-
while (first != last) {
606-
if (!(*first)) return false;
607-
++first;
608-
}
609-
return true;
610-
}
611-
};
612-
613598
/**
614599
* Interface for message handling
615600
*/

src/test/validation_tests.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <test/util/setup_common.h>
1111

12-
#include <boost/signals2/signal.hpp>
1312
#include <boost/test/unit_test.hpp>
1413

1514
BOOST_FIXTURE_TEST_SUITE(validation_tests, TestingSetup)
@@ -120,20 +119,4 @@ BOOST_AUTO_TEST_CASE(signet_parse_tests)
120119
BOOST_CHECK(!CheckSignetBlockSolution(block, signet_params->GetConsensus()));
121120
}
122121

123-
static bool ReturnFalse() { return false; }
124-
static bool ReturnTrue() { return true; }
125-
126-
BOOST_AUTO_TEST_CASE(test_combiner_all)
127-
{
128-
boost::signals2::signal<bool (), CombinerAll> Test;
129-
BOOST_CHECK(Test());
130-
Test.connect(&ReturnFalse);
131-
BOOST_CHECK(!Test());
132-
Test.connect(&ReturnTrue);
133-
BOOST_CHECK(!Test());
134-
Test.disconnect(&ReturnFalse);
135-
BOOST_CHECK(Test());
136-
Test.disconnect(&ReturnTrue);
137-
BOOST_CHECK(Test());
138-
}
139122
BOOST_AUTO_TEST_SUITE_END()

0 commit comments

Comments
 (0)