mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
[net] Remove CombinerAll
This was introduced in9519a9a4
for use with boost signals. Boost signals have not been used in net since8ad663c1
, so this code is unused
This commit is contained in:
parent
9dd4de2832
commit
1afcd41a90
2 changed files with 0 additions and 32 deletions
15
src/net.h
15
src/net.h
|
@ -595,21 +595,6 @@ void InterruptMapPort();
|
|||
void StopMapPort();
|
||||
uint16_t GetListenPort();
|
||||
|
||||
struct CombinerAll
|
||||
{
|
||||
typedef bool result_type;
|
||||
|
||||
template<typename I>
|
||||
bool operator()(I first, I last) const
|
||||
{
|
||||
while (first != last) {
|
||||
if (!(*first)) return false;
|
||||
++first;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Interface for message handling
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include <test/util/setup_common.h>
|
||||
|
||||
#include <boost/signals2/signal.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(validation_tests, TestingSetup)
|
||||
|
@ -120,20 +119,4 @@ BOOST_AUTO_TEST_CASE(signet_parse_tests)
|
|||
BOOST_CHECK(!CheckSignetBlockSolution(block, signet_params->GetConsensus()));
|
||||
}
|
||||
|
||||
static bool ReturnFalse() { return false; }
|
||||
static bool ReturnTrue() { return true; }
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_combiner_all)
|
||||
{
|
||||
boost::signals2::signal<bool (), CombinerAll> Test;
|
||||
BOOST_CHECK(Test());
|
||||
Test.connect(&ReturnFalse);
|
||||
BOOST_CHECK(!Test());
|
||||
Test.connect(&ReturnTrue);
|
||||
BOOST_CHECK(!Test());
|
||||
Test.disconnect(&ReturnFalse);
|
||||
BOOST_CHECK(Test());
|
||||
Test.disconnect(&ReturnTrue);
|
||||
BOOST_CHECK(Test());
|
||||
}
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
|
Loading…
Add table
Reference in a new issue