From 2c504db354709f5f838e1b7e50830af50666edb2 Mon Sep 17 00:00:00 2001 From: arkpar Date: Wed, 19 Aug 2015 15:17:08 +0200 Subject: [PATCH] Fake az and mix targets for buildbot --- CMakeLists.txt | 4 + alethzero/CMakeLists.txt | 1 + mix/CMakeLists.txt | 1 + mix/Web3Server.cpp | 172 --------------------------------------- 4 files changed, 6 insertions(+), 172 deletions(-) create mode 100644 alethzero/CMakeLists.txt create mode 100644 mix/CMakeLists.txt delete mode 100644 mix/Web3Server.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 440772f92..913349819 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -506,5 +506,9 @@ if (GUI) add_subdirectory(libnatspec) add_subdirectory(libjsqrc) + + + add_subdirectory(alethzero) + add_subdirectory(mix) endif() diff --git a/alethzero/CMakeLists.txt b/alethzero/CMakeLists.txt new file mode 100644 index 000000000..d1ddea036 --- /dev/null +++ b/alethzero/CMakeLists.txt @@ -0,0 +1 @@ +add_custom_target(alethzero) diff --git a/mix/CMakeLists.txt b/mix/CMakeLists.txt new file mode 100644 index 000000000..b69b9bae1 --- /dev/null +++ b/mix/CMakeLists.txt @@ -0,0 +1 @@ +add_custom_target(mix) diff --git a/mix/Web3Server.cpp b/mix/Web3Server.cpp deleted file mode 100644 index e6d670720..000000000 --- a/mix/Web3Server.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/* - This file is part of cpp-ethereum. - - cpp-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - cpp-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . -*/ -/** @file Web3Server.h.cpp - * @author Arkadiy Paronyan arkadiy@ethdev.com - * @date 2014 - * Ethereum IDE client. - */ - -#include -#include -#include -#include -#include -#include "Web3Server.h" - -using namespace dev::mix; -using namespace dev; - -namespace -{ -class EmptyNetwork : public dev::WebThreeNetworkFace -{ - std::vector peers() override - { - return std::vector(); - } - - size_t peerCount() const override - { - return 0; - } - - void addPeer(p2p::NodeSpec const& _node, p2p::PeerType _t) override - { - (void)_node; - (void)_t; - } - - void addNode(p2p::NodeID const& _node, bi::tcp::endpoint const& _hostEndpoint) override - { - (void)_node; - (void)_hostEndpoint; - } - - void requirePeer(p2p::NodeID const& _node, bi::tcp::endpoint const& _endpoint) override - { - (void)_node; - (void)_endpoint; - } - - dev::bytes saveNetwork() override - { - return dev::bytes(); - } - - void setIdealPeerCount(size_t _n) override - { - (void)_n; - } - - bool haveNetwork() const override - { - return false; - } - - p2p::NetworkPreferences const& networkPreferences() const override - { - static const p2p::NetworkPreferences c_ret; - return c_ret; - } - - void setNetworkPreferences(p2p::NetworkPreferences const& _n, bool _dropPeers) override - { - (void)_n; - (void)_dropPeers; - } - - p2p::NodeInfo nodeInfo() const override { return p2p::NodeInfo(); } - - std::string enode() const override { return ""; } - - p2p::NodeID id() const override - { - return p2p::NodeID(); - } - - p2p::Peers nodes() const override - { - return p2p::Peers(); - } - - void startNetwork() override - { - } - - void stopNetwork() override - { - } - - bool isNetworkStarted() const override - { - return false; - } -}; - -} - -Web3Server::Web3Server(jsonrpc::AbstractServerConnector& _conn, std::shared_ptr const& _ethAccounts, std::vector const& _shhAccounts, dev::eth::Interface* _client): - WebThreeStubServerBase(_conn, _ethAccounts, _shhAccounts), - m_client(_client), - m_network(new EmptyNetwork()) -{ -} - -Web3Server::~Web3Server() -{ -} - -std::shared_ptr Web3Server::face() -{ - BOOST_THROW_EXCEPTION(InterfaceNotSupported("dev::shh::Interface")); -} - -dev::WebThreeNetworkFace* Web3Server::network() -{ - return m_network.get(); -} - -std::string Web3Server::get(std::string const& _name, std::string const& _key) -{ - std::string k(_name + "/" + _key); - return m_db[k]; -} - -void Web3Server::put(std::string const& _name, std::string const& _key, std::string const& _value) -{ - std::string k(_name + "/" + _key); - m_db[k] = _value; -} - -Json::Value Web3Server::eth_getFilterChanges(std::string const& _filterId) -{ - return WebThreeStubServerBase::eth_getFilterChanges(_filterId); -} - -std::string Web3Server::eth_sendTransaction(Json::Value const& _json) -{ - std::string ret = WebThreeStubServerBase::eth_sendTransaction(_json); - emit newTransaction(); - return ret; -} - -std::string Web3Server::eth_call(Json::Value const& _json, std::string const& _blockNumber) -{ - std::string ret = WebThreeStubServerBase::eth_call(_json, _blockNumber); - emit newTransaction(); - return ret; -}