mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Revert all asio.h includes except for in 2 files, DebuggingStateWrapper.h and Transact.cpp. After enabling WIN32_LEAN_AND_MEAN, all the asio.h include issues, commit 20b6e24ffcab088e71092e07030a377d3135da3c, went away.
This commit is contained in:
parent
5ae585f7cf
commit
e229b5d291
@ -24,8 +24,6 @@
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
#include <libethereum/Client.h>
|
||||
|
@ -23,8 +23,6 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "JsonSpiritHeaders.h"
|
||||
|
@ -20,9 +20,6 @@
|
||||
* Check a random test and return 0/1 for success or failure. To be used for efficiency in the random test simulation.
|
||||
*/
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
#include <libdevcore/Common.h>
|
||||
#include <libdevcore/Exceptions.h>
|
||||
#include <libdevcore/Log.h>
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/random.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
|
2
fork.cpp
2
fork.cpp
@ -20,8 +20,6 @@
|
||||
* Tests for different forking behavior
|
||||
*/
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
|
||||
|
@ -23,8 +23,6 @@
|
||||
#include <fstream>
|
||||
#include <random>
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "JsonSpiritHeaders.h"
|
||||
@ -44,7 +42,7 @@ BOOST_AUTO_TEST_CASE(emptySHA3Types)
|
||||
{
|
||||
h256 emptyListSHA3(fromHex("1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"));
|
||||
BOOST_REQUIRE_EQUAL(emptyListSHA3, EmptyListSHA3);
|
||||
|
||||
|
||||
h256 emptySHA3(fromHex("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"));
|
||||
BOOST_REQUIRE_EQUAL(emptySHA3, EmptySHA3);
|
||||
}
|
||||
|
@ -22,8 +22,6 @@
|
||||
|
||||
#include <fstream>
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "JsonSpiritHeaders.h"
|
||||
|
10
net.cpp
10
net.cpp
@ -19,8 +19,6 @@
|
||||
* @date 2014
|
||||
*/
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <libdevcore/Worker.h>
|
||||
@ -192,22 +190,22 @@ BOOST_AUTO_TEST_CASE(kademlia)
|
||||
|
||||
node.populateAll();
|
||||
clog << "NodeTable:\n" << *node.nodeTable.get() << endl;
|
||||
|
||||
|
||||
auto nodes = node.nodeTable->nodes();
|
||||
nodes.sort();
|
||||
|
||||
|
||||
node.nodeTable->reset();
|
||||
clog << "NodeTable:\n" << *node.nodeTable.get() << endl;
|
||||
|
||||
node.populate(1);
|
||||
clog << "NodeTable:\n" << *node.nodeTable.get() << endl;
|
||||
|
||||
|
||||
node.nodeTable->discover();
|
||||
this_thread::sleep_for(chrono::milliseconds(2000));
|
||||
clog << "NodeTable:\n" << *node.nodeTable.get() << endl;
|
||||
|
||||
BOOST_REQUIRE_EQUAL(node.nodeTable->count(), 8);
|
||||
|
||||
|
||||
auto netNodes = node.nodeTable->nodes();
|
||||
netNodes.sort();
|
||||
|
||||
|
2
rlp.cpp
2
rlp.cpp
@ -23,8 +23,6 @@
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <libdevcore/Log.h>
|
||||
|
@ -20,8 +20,6 @@
|
||||
* State test functions.
|
||||
*/
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
|
2
trie.cpp
2
trie.cpp
@ -23,8 +23,6 @@
|
||||
#include <fstream>
|
||||
#include <random>
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "JsonSpiritHeaders.h"
|
||||
|
@ -20,8 +20,6 @@
|
||||
* Simple peer transaction send test.
|
||||
*/
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
|
||||
|
2
vm.cpp
2
vm.cpp
@ -22,8 +22,6 @@
|
||||
|
||||
#include <chrono>
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <libethereum/Executive.h>
|
||||
|
2
vm.h
2
vm.h
@ -26,8 +26,6 @@ along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <fstream>
|
||||
#include <cstdint>
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <json_spirit/json_spirit.h>
|
||||
|
@ -20,8 +20,6 @@
|
||||
*/
|
||||
#include <functional>
|
||||
|
||||
// Make sure boost/asio.hpp is included before windows.h.
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <libp2p/Host.h>
|
||||
@ -44,10 +42,10 @@ BOOST_AUTO_TEST_CASE(topic)
|
||||
Host host1("Test", NetworkPreferences(30303, "127.0.0.1", false, true));
|
||||
auto whost1 = host1.registerCapability(new WhisperHost());
|
||||
host1.start();
|
||||
|
||||
|
||||
while (!host1.isStarted())
|
||||
this_thread::sleep_for(chrono::milliseconds(2));
|
||||
|
||||
|
||||
bool started = false;
|
||||
unsigned result = 0;
|
||||
std::thread listener([&]()
|
||||
@ -75,19 +73,19 @@ BOOST_AUTO_TEST_CASE(topic)
|
||||
}
|
||||
this_thread::sleep_for(chrono::milliseconds(50));
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
Host host2("Test", NetworkPreferences(30300, "127.0.0.1", false, true));
|
||||
auto whost2 = host2.registerCapability(new WhisperHost());
|
||||
host2.start();
|
||||
|
||||
|
||||
while (!host2.isStarted())
|
||||
this_thread::sleep_for(chrono::milliseconds(2));
|
||||
|
||||
|
||||
this_thread::sleep_for(chrono::milliseconds(100));
|
||||
host2.addNode(host1.id(), "127.0.0.1", 30303, 30303);
|
||||
|
||||
|
||||
this_thread::sleep_for(chrono::milliseconds(500));
|
||||
|
||||
while (!started)
|
||||
@ -111,7 +109,7 @@ BOOST_AUTO_TEST_CASE(forwarding)
|
||||
cnote << "Testing Whisper forwarding...";
|
||||
auto oldLogVerbosity = g_logVerbosity;
|
||||
g_logVerbosity = 0;
|
||||
|
||||
|
||||
// Host must be configured not to share peers.
|
||||
Host host1("Listner", NetworkPreferences(30303, "", false, true));
|
||||
host1.setIdealPeerCount(0);
|
||||
@ -119,7 +117,7 @@ BOOST_AUTO_TEST_CASE(forwarding)
|
||||
host1.start();
|
||||
while (!host1.isStarted())
|
||||
this_thread::sleep_for(chrono::milliseconds(2));
|
||||
|
||||
|
||||
unsigned result = 0;
|
||||
bool done = false;
|
||||
|
||||
@ -146,7 +144,7 @@ BOOST_AUTO_TEST_CASE(forwarding)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Host must be configured not to share peers.
|
||||
Host host2("Forwarder", NetworkPreferences(30305, "", false, true));
|
||||
host2.setIdealPeerCount(1);
|
||||
@ -154,7 +152,7 @@ BOOST_AUTO_TEST_CASE(forwarding)
|
||||
host2.start();
|
||||
while (!host2.isStarted())
|
||||
this_thread::sleep_for(chrono::milliseconds(2));
|
||||
|
||||
|
||||
Public fwderid;
|
||||
bool startedForwarder = false;
|
||||
std::thread forwarder([&]()
|
||||
@ -214,7 +212,7 @@ BOOST_AUTO_TEST_CASE(asyncforwarding)
|
||||
|
||||
unsigned result = 0;
|
||||
bool done = false;
|
||||
|
||||
|
||||
// Host must be configured not to share peers.
|
||||
Host host1("Forwarder", NetworkPreferences(30305, "", false, true));
|
||||
host1.setIdealPeerCount(1);
|
||||
@ -227,7 +225,7 @@ BOOST_AUTO_TEST_CASE(asyncforwarding)
|
||||
std::thread forwarder([&]()
|
||||
{
|
||||
setThreadName("forwarder");
|
||||
|
||||
|
||||
this_thread::sleep_for(chrono::milliseconds(500));
|
||||
// ph.addNode("127.0.0.1", 30303, 30303);
|
||||
|
||||
@ -249,7 +247,7 @@ BOOST_AUTO_TEST_CASE(asyncforwarding)
|
||||
|
||||
while (!startedForwarder)
|
||||
this_thread::sleep_for(chrono::milliseconds(2));
|
||||
|
||||
|
||||
{
|
||||
Host host2("Sender", NetworkPreferences(30300, "", false, true));
|
||||
host2.setIdealPeerCount(1);
|
||||
@ -261,7 +259,7 @@ BOOST_AUTO_TEST_CASE(asyncforwarding)
|
||||
|
||||
while (!host2.peerCount())
|
||||
this_thread::sleep_for(chrono::milliseconds(5));
|
||||
|
||||
|
||||
KeyPair us = KeyPair::create();
|
||||
whost2->post(us.sec(), RLPStream().append(1).out(), BuildTopic("test"));
|
||||
this_thread::sleep_for(chrono::milliseconds(250));
|
||||
|
Loading…
Reference in New Issue
Block a user