Browse Source

Fixed VS2013 projects and compile errors.

Enable and fix addition warnings (-Wextra).
Disable unknown pragma warning (avoids messy wrapping pragmas in compiler guards).
Tidy up some of the waring suppression for 3rd part libraries by wrapping with a header.
cl-refactor
Tim Hughes 11 years ago
parent
commit
43662cd8fa
  1. 2
      CMakeLists.txt
  2. 2
      libethereum/CommonData.cpp
  3. 14
      libethereum/CommonEth.cpp
  4. 36
      libethereum/CryptoHeaders.h
  5. 11
      libethereum/Dagger.cpp
  6. 8
      libethereum/ExtVMFace.h
  7. 4
      libethereum/PeerServer.cpp
  8. 4
      libethereum/PeerServer.h
  9. 4
      libethereum/PeerSession.cpp
  10. 2
      libethereum/State.h
  11. 10
      libethereum/TrieDB.h
  12. 22
      libethereum/VM.cpp
  13. 15
      libethereum/VM.h
  14. 6
      libethereum/vector_ref.h
  15. 32
      test/JsonSpiritHeaders.h
  16. 3
      test/hexPrefix.cpp
  17. 3
      test/rlp.cpp
  18. 3
      test/trie.cpp
  19. 3
      test/vm.cpp
  20. 4
      walleth/MainWin.cpp
  21. 8
      windows/LibCryptoPP.vcxproj
  22. 2
      windows/LibEthereum.props
  23. 31
      windows/LibEthereum.vcxproj
  24. 47
      windows/LibEthereum.vcxproj.filters
  25. 8
      windows/LibLevelDB.vcxproj
  26. 8
      windows/LibMiniUPnPc.vcxproj
  27. 5
      windows/TestEthereum.vcxproj
  28. 19
      windows/TestEthereum.vcxproj.filters
  29. 33
      windows/Walleth.vcxproj
  30. 3
      windows/Walleth.vcxproj.filters
  31. 2
      windows/WinMain.cpp
  32. 32
      windows/stdafx.h

2
CMakeLists.txt

@ -58,7 +58,7 @@ else ()
endif ()
# Initialize CXXFLAGS.
set(CMAKE_CXX_FLAGS "-Wall -std=c++11")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG")

2
libethereum/CommonData.cpp

@ -36,7 +36,7 @@ std::string eth::escaped(std::string const& _s, bool _all)
ret += "\\\"";
else if (i == '\\' && !_all)
ret += "\\\\";
else if (i < ' ' || i > 127 || _all)
else if (i < ' ' || _all)
{
ret += "\\x";
ret.push_back("0123456789abcdef"[(uint8_t)i / 16]);

14
libethereum/CommonEth.cpp

@ -20,19 +20,7 @@
*/
#include "CommonEth.h"
#if WIN32
#pragma warning(push)
#pragma warning(disable:4244)
#else
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#include <secp256k1.h>
#include <sha3.h>
#if WIN32
#pragma warning(pop)
#else
#endif
#include "CryptoHeaders.h"
#include "Exceptions.h"
using namespace std;
using namespace eth;

36
libethereum/CryptoHeaders.h

@ -0,0 +1,36 @@
/*
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 <http://www.gnu.org/licenses/>.
*/
/** @file CryptoHeaders.h
* @author Tim Hughes <tim@twistedfury.com>
* @date 2014
*/
#pragma once
// need to leave this one disabled
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma warning(push)
#pragma warning(disable:4100 4244)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include <sha.h>
#include <sha3.h>
#include <ripemd.h>
#include <secp256k1.h>
#pragma warning(pop)
#pragma GCC diagnostic pop

11
libethereum/Dagger.cpp

@ -22,17 +22,8 @@
#include <boost/detail/endian.hpp>
#include <chrono>
#include <array>
#if WIN32
#pragma warning(push)
#pragma warning(disable:4244)
#else
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#include <sha3.h>
#if WIN32
#pragma warning(pop)
#endif
#include <random>
#include "CryptoHeaders.h"
#include "Common.h"
#include "Dagger.h"
using namespace std;

8
libethereum/ExtVMFace.h

@ -53,6 +53,12 @@ public:
currentNumber(_currentNumber)
{}
#pragma warning(push)
#pragma warning(disable: 4100)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
u256 store(u256 _n) { return 0; }
void setStore(u256 _n, u256 _v) {}
void mktx(Transaction& _t) {}
@ -62,6 +68,8 @@ public:
u256 extro(Address _a, u256 _pos) { return 0; }
u256 extroPrice(Address _a) { return 0; }
void suicide(Address _a) {}
#pragma GCC diagnostic pop
#pragma warning(pop)
Address myAddress;
Address txSender;

4
libethereum/PeerServer.cpp

@ -55,7 +55,7 @@ static const set<bi::address> c_rejectAddresses = {
{bi::address_v6::from_string("::")}
};
PeerServer::PeerServer(std::string const& _clientVersion, BlockChain const& _ch, uint _networkId, unsigned short _port, NodeMode _m, string const& _publicAddress, bool _upnp):
PeerServer::PeerServer(std::string const& _clientVersion, BlockChain const& _ch, unsigned int _networkId, unsigned short _port, NodeMode _m, string const& _publicAddress, bool _upnp):
m_clientVersion(_clientVersion),
m_mode(_m),
m_listenPort(_port),
@ -71,7 +71,7 @@ PeerServer::PeerServer(std::string const& _clientVersion, BlockChain const& _ch,
clog(NetNote) << "Id:" << toHex(m_key.address().ref().cropped(0, 4)) << "Mode: " << (_m == NodeMode::PeerServer ? "PeerServer" : "Full");
}
PeerServer::PeerServer(std::string const& _clientVersion, uint _networkId, NodeMode _m):
PeerServer::PeerServer(std::string const& _clientVersion, unsigned int _networkId, NodeMode _m):
m_clientVersion(_clientVersion),
m_mode(_m),
m_listenPort(0),

4
libethereum/PeerServer.h

@ -41,9 +41,9 @@ class PeerServer
public:
/// Start server, listening for connections on the given port.
PeerServer(std::string const& _clientVersion, BlockChain const& _ch, uint _networkId, unsigned short _port, NodeMode _m = NodeMode::Full, std::string const& _publicAddress = std::string(), bool _upnp = true);
PeerServer(std::string const& _clientVersion, BlockChain const& _ch, unsigned int _networkId, unsigned short _port, NodeMode _m = NodeMode::Full, std::string const& _publicAddress = std::string(), bool _upnp = true);
/// Start server, but don't listen.
PeerServer(std::string const& _clientVersion, uint _networkId, NodeMode _m = NodeMode::Full);
PeerServer(std::string const& _clientVersion, unsigned int _networkId, NodeMode _m = NodeMode::Full);
~PeerServer();
static unsigned protocolVersion();

4
libethereum/PeerSession.cpp

@ -431,7 +431,7 @@ void PeerSession::sendDestroy(bytes& _msg)
auto self(shared_from_this());
bytes* buffer = new bytes(std::move(_msg));
if (m_socket.is_open())
ba::async_write(m_socket, ba::buffer(*buffer), [self, buffer](boost::system::error_code ec, std::size_t length)
ba::async_write(m_socket, ba::buffer(*buffer), [self, buffer](boost::system::error_code ec, std::size_t /*length*/)
{
delete buffer;
if (ec)
@ -455,7 +455,7 @@ void PeerSession::send(bytesConstRef _msg)
auto self(shared_from_this());
bytes* buffer = new bytes(_msg.toBytes());
if (m_socket.is_open())
ba::async_write(m_socket, ba::buffer(*buffer), [self, buffer](boost::system::error_code ec, std::size_t length)
ba::async_write(m_socket, ba::buffer(*buffer), [self, buffer](boost::system::error_code ec, std::size_t /*length*/)
{
delete buffer;
if (ec)

2
libethereum/State.h

@ -292,7 +292,7 @@ public:
u256 balance(Address _a) { return m_s.balance(_a); }
u256 txCount(Address _a) { return m_s.transactionsFrom(_a); }
u256 extro(Address _a, u256 _pos) { return m_s.contractMemory(_a, _pos); }
u256 extroPrice(Address _a) { return 0; }
u256 extroPrice(Address /*_a*/) { return 0; }
void suicide(Address _a)
{
m_s.addBalance(_a, m_s.balance(myAddress) + m_store->size() * fees.m_memoryFee);

10
libethereum/TrieDB.h

@ -23,7 +23,6 @@
#include <map>
#include <memory>
#include <leveldb/db.h>
#include "Exceptions.h"
#include "CommonEth.h"
#include "Log.h"
@ -84,11 +83,6 @@ private:
ldb::WriteOptions m_writeOptions;
};
#if WIN32
#pragma warning(push)
#pragma warning(disable:4100) // disable warnings so it compiles
#endif
extern const h256 c_shaNull;
/**
@ -339,10 +333,6 @@ std::ostream& operator<<(std::ostream& _out, GenericTrieDB<DB> const& _db)
return _out;
}
#if WIN32
#pragma warning(pop)
#endif
template <class KeyType, class DB>
class TrieDB: public GenericTrieDB<DB>
{

22
libethereum/VM.cpp

@ -21,28 +21,6 @@
#include "VM.h"
#include <secp256k1.h>
#include <boost/filesystem.hpp>
#if WIN32
#pragma warning(push)
#pragma warning(disable:4244)
#else
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#include <sha.h>
#include <sha3.h>
#include <ripemd.h>
#if WIN32
#pragma warning(pop)
#else
#endif
#include <ctime>
#include <random>
#include "BlockChain.h"
#include "Instruction.h"
#include "Exceptions.h"
#include "Dagger.h"
#include "Defaults.h"
using namespace std;
using namespace eth;

15
libethereum/VM.h

@ -22,20 +22,7 @@
#pragma once
#include <unordered_map>
#include <secp256k1.h>
#if WIN32
#pragma warning(push)
#pragma warning(disable:4244)
#else
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#include <sha.h>
#include <sha3.h>
#include <ripemd.h>
#if WIN32
#pragma warning(pop)
#else
#endif
#include "CryptoHeaders.h"
#include "Common.h"
#include "Exceptions.h"
#include "FeeStructure.h"

6
libethereum/vector_ref.h

@ -5,14 +5,10 @@
#include <vector>
#include <string>
#if WIN32
#pragma warning(push)
#pragma warning(disable: 4267)
#endif
#pragma warning(disable: 4100 4267)
#include <leveldb/db.h>
#if WIN32
#pragma warning(pop)
#endif
namespace eth
{

32
test/JsonSpiritHeaders.h

@ -0,0 +1,32 @@
/*
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 <http://www.gnu.org/licenses/>.
*/
/** @file JsonSpiritHeaders.h
* @author Tim Hughes <tim@twistedfury.com>
* @date 2014
*/
#pragma once
#pragma warning(push)
#pragma warning(disable: 4100)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include "../json_spirit/json_spirit_reader_template.h"
#include "../json_spirit/json_spirit_writer_template.h"
#pragma GCC diagnostic pop
#pragma warning(pop)

3
test/hexPrefix.cpp

@ -21,8 +21,7 @@
*/
#include <fstream>
#include "../json_spirit/json_spirit_reader_template.h"
#include "../json_spirit/json_spirit_writer_template.h"
#include "JsonSpiritHeaders.h"
#include "TrieCommon.h"
#include "Log.h"
using namespace std;

3
test/rlp.cpp

@ -21,8 +21,7 @@
*/
#include <fstream>
#include "../json_spirit/json_spirit_reader_template.h"
#include "../json_spirit/json_spirit_writer_template.h"
#include "JsonSpiritHeaders.h"
#include <Log.h>
#include <RLP.h>
using namespace std;

3
test/trie.cpp

@ -21,9 +21,8 @@
*/
#include <fstream>
#include "../json_spirit/json_spirit_reader_template.h"
#include "../json_spirit/json_spirit_writer_template.h"
#include <random>
#include "JsonSpiritHeaders.h"
#include <TrieDB.h>
#include "TrieHash.h"
#include "MemTrie.h"

3
test/vm.cpp

@ -21,13 +21,12 @@
*/
#include <fstream>
#include "../json_spirit/json_spirit_reader_template.h"
#include "../json_spirit/json_spirit_writer_template.h"
#include <ExtVMFace.h>
#include <Transaction.h>
#include <VM.h>
#include <Log.h>
#include <Instruction.h>
#include "JsonSpiritHeaders.h"
using namespace std;
using namespace json_spirit;
using namespace eth;

4
walleth/MainWin.cpp

@ -85,7 +85,7 @@ void QEthereum::setCoinbase(Address _a)
}
}
QAccount::QAccount(QObject* _p)
QAccount::QAccount(QObject*)
{
}
@ -170,7 +170,7 @@ double QEthereum::txCountAt(Address _a) const
unsigned QEthereum::peerCount() const
{
return client()->peerCount();
return (unsigned)client()->peerCount();
}
void QEthereum::transact(Secret _secret, Address _dest, u256 _amount)

8
windows/LibCryptoPP.vcxproj

@ -116,7 +116,7 @@
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4100;4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -129,7 +129,7 @@
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4100;4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -144,7 +144,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4100;4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -161,7 +161,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4100;4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

2
windows/LibEthereum.props

@ -11,7 +11,7 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<DisableSpecificWarnings>4068;4100;4127;4258;4505;4512;4706</DisableSpecificWarnings>
<DisableSpecificWarnings>4068;4127;4258;4505;4512;4706</DisableSpecificWarnings>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>false</MinimalRebuild>

31
windows/LibEthereum.vcxproj

@ -28,21 +28,36 @@
<ClCompile Include="..\libethereum\BlockChain.cpp" />
<ClCompile Include="..\libethereum\BlockInfo.cpp" />
<ClCompile Include="..\libethereum\Client.cpp" />
<ClCompile Include="..\libethereum\Common.cpp" />
<ClCompile Include="..\libethereum\Common.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\libethereum\CommonData.cpp" />
<ClCompile Include="..\libethereum\CommonEth.cpp" />
<ClCompile Include="..\libethereum\CommonIO.cpp" />
<ClCompile Include="..\libethereum\Dagger.cpp" />
<ClCompile Include="..\libethereum\Defaults.cpp" />
<ClCompile Include="..\libethereum\FeeStructure.cpp" />
<ClCompile Include="..\libethereum\FileSystem.cpp" />
<ClCompile Include="..\libethereum\FixedHash.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\libethereum\Instruction.cpp" />
<ClCompile Include="..\libethereum\MemTrie.cpp" />
<ClCompile Include="..\libethereum\Log.cpp" />
<ClCompile Include="..\libethereum\PeerNetwork.cpp" />
<ClCompile Include="..\libethereum\PeerServer.cpp" />
<ClCompile Include="..\libethereum\PeerSession.cpp" />
<ClCompile Include="..\libethereum\RLP.cpp" />
<ClCompile Include="..\libethereum\State.cpp" />
<ClCompile Include="..\libethereum\Transaction.cpp" />
<ClCompile Include="..\libethereum\TransactionQueue.cpp" />
<ClCompile Include="..\libethereum\TrieCommon.cpp" />
<ClCompile Include="..\libethereum\TrieDB.cpp" />
<ClCompile Include="..\libethereum\TrieHash.cpp" />
<ClCompile Include="..\libethereum\UPnP.cpp" />
<ClCompile Include="..\libethereum\VM.cpp" />
<ClCompile Include="stdafx.cpp">
@ -59,22 +74,28 @@
<ClInclude Include="..\libethereum\BlockInfo.h" />
<ClInclude Include="..\libethereum\Client.h" />
<ClInclude Include="..\libethereum\Common.h" />
<ClInclude Include="..\libethereum\CommonData.h" />
<ClInclude Include="..\libethereum\CommonEth.h" />
<ClInclude Include="..\libethereum\CommonIO.h" />
<ClInclude Include="..\libethereum\CryptoHeaders.h" />
<ClInclude Include="..\libethereum\Dagger.h" />
<ClInclude Include="..\libethereum\Defaults.h" />
<ClInclude Include="..\libethereum\Exceptions.h" />
<ClInclude Include="..\libethereum\ExtVMFace.h" />
<ClInclude Include="..\libethereum\FeeStructure.h" />
<ClInclude Include="..\libethereum\FileSystem.h" />
<ClInclude Include="..\libethereum\FixedHash.h" />
<ClInclude Include="..\libethereum\Instruction.h" />
<ClInclude Include="..\libethereum\MemTrie.h" />
<ClInclude Include="..\libethereum\Log.h" />
<ClInclude Include="..\libethereum\PeerNetwork.h" />
<ClInclude Include="..\libethereum\PeerServer.h" />
<ClInclude Include="..\libethereum\PeerSession.h" />
<ClInclude Include="..\libethereum\RLP.h" />
<ClInclude Include="..\libethereum\State.h" />
<ClInclude Include="..\libethereum\Transaction.h" />
<ClInclude Include="..\libethereum\TransactionQueue.h" />
<ClInclude Include="..\libethereum\TrieCommon.h" />
<ClInclude Include="..\libethereum\TrieDB.h" />
<ClInclude Include="..\libethereum\TrieHash.h" />
<ClInclude Include="..\libethereum\UPnP.h" />
<ClInclude Include="..\libethereum\vector_ref.h" />
<ClInclude Include="..\libethereum\VM.h" />

47
windows/LibEthereum.vcxproj.filters

@ -1,59 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\libethereum\AddressState.cpp" />
<ClCompile Include="stdafx.cpp">
<Filter>Windows</Filter>
</ClCompile>
<ClCompile Include="..\libethereum\BlockChain.cpp" />
<ClCompile Include="..\libethereum\BlockInfo.cpp" />
<ClCompile Include="..\libethereum\Client.cpp" />
<ClCompile Include="..\libethereum\Common.cpp" />
<ClCompile Include="..\libethereum\CommonData.cpp" />
<ClCompile Include="..\libethereum\CommonEth.cpp" />
<ClCompile Include="..\libethereum\CommonIO.cpp" />
<ClCompile Include="..\libethereum\Dagger.cpp" />
<ClCompile Include="..\libethereum\Defaults.cpp" />
<ClCompile Include="..\libethereum\FeeStructure.cpp" />
<ClCompile Include="..\libethereum\FileSystem.cpp" />
<ClCompile Include="..\libethereum\MemTrie.cpp" />
<ClCompile Include="..\libethereum\FixedHash.cpp" />
<ClCompile Include="..\libethereum\Instruction.cpp" />
<ClCompile Include="..\libethereum\Log.cpp" />
<ClCompile Include="..\libethereum\PeerNetwork.cpp" />
<ClCompile Include="..\libethereum\PeerServer.cpp" />
<ClCompile Include="..\libethereum\PeerSession.cpp" />
<ClCompile Include="..\libethereum\RLP.cpp" />
<ClCompile Include="..\libethereum\State.cpp" />
<ClCompile Include="..\libethereum\Transaction.cpp" />
<ClCompile Include="..\libethereum\TransactionQueue.cpp" />
<ClCompile Include="..\libethereum\TrieCommon.cpp" />
<ClCompile Include="..\libethereum\TrieDB.cpp" />
<ClCompile Include="..\libethereum\TrieHash.cpp" />
<ClCompile Include="..\libethereum\UPnP.cpp" />
<ClCompile Include="..\libethereum\AddressState.cpp" />
<ClCompile Include="..\libethereum\BlockChain.cpp" />
<ClCompile Include="..\libethereum\Instruction.cpp" />
<ClCompile Include="stdafx.cpp">
<Filter>Windows</Filter>
</ClCompile>
<ClCompile Include="..\libethereum\FeeStructure.cpp" />
<ClCompile Include="..\libethereum\VM.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Windows</Filter>
</ClInclude>
<ClInclude Include="..\libethereum\BlockChain.h" />
<ClInclude Include="..\libethereum\BlockInfo.h" />
<ClInclude Include="..\libethereum\Client.h" />
<ClInclude Include="..\libethereum\Common.h" />
<ClInclude Include="..\libethereum\CommonData.h" />
<ClInclude Include="..\libethereum\CommonEth.h" />
<ClInclude Include="..\libethereum\CommonIO.h" />
<ClInclude Include="..\libethereum\Dagger.h" />
<ClInclude Include="..\libethereum\Defaults.h" />
<ClInclude Include="..\libethereum\Exceptions.h" />
<ClInclude Include="..\libethereum\ExtVMFace.h" />
<ClInclude Include="..\libethereum\FeeStructure.h" />
<ClInclude Include="..\libethereum\FileSystem.h" />
<ClInclude Include="..\libethereum\FixedHash.h" />
<ClInclude Include="..\libethereum\Instruction.h" />
<ClInclude Include="..\libethereum\MemTrie.h" />
<ClInclude Include="..\libethereum\Log.h" />
<ClInclude Include="..\libethereum\PeerNetwork.h" />
<ClInclude Include="..\libethereum\PeerServer.h" />
<ClInclude Include="..\libethereum\PeerSession.h" />
<ClInclude Include="..\libethereum\RLP.h" />
<ClInclude Include="..\libethereum\State.h" />
<ClInclude Include="..\libethereum\Transaction.h" />
<ClInclude Include="..\libethereum\TransactionQueue.h" />
<ClInclude Include="..\libethereum\TrieCommon.h" />
<ClInclude Include="..\libethereum\TrieDB.h" />
<ClInclude Include="..\libethereum\TrieHash.h" />
<ClInclude Include="..\libethereum\UPnP.h" />
<ClInclude Include="..\libethereum\vector_ref.h" />
<ClInclude Include="..\libethereum\AddressState.h" />
<ClInclude Include="..\libethereum\BlockChain.h" />
<ClInclude Include="stdafx.h">
<Filter>Windows</Filter>
</ClInclude>
<ClInclude Include="..\libethereum\ExtVMFace.h" />
<ClInclude Include="..\libethereum\FeeStructure.h" />
<ClInclude Include="..\libethereum\VM.h" />
<ClInclude Include="..\libethereum\AddressState.h" />
<ClInclude Include="..\libethereum\CryptoHeaders.h" />
</ItemGroup>
<ItemGroup>
<Filter Include="Windows">

8
windows/LibLevelDB.vcxproj

@ -157,7 +157,7 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);../../leveldb</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4018;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4018;4100;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -172,7 +172,7 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);../../leveldb</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4018;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4018;4100;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -189,7 +189,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);../../leveldb</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4018;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4018;4100;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -208,7 +208,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);../../leveldb</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4018;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4018;4100;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

8
windows/LibMiniUPnPc.vcxproj

@ -109,7 +109,7 @@
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4100;4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -126,7 +126,7 @@
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4100;4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -145,7 +145,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4100;4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -166,7 +166,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4100;4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

5
windows/TestEthereum.vcxproj

@ -160,10 +160,12 @@
<ClCompile Include="..\test\dagger.cpp" />
<ClCompile Include="..\test\hexPrefix.cpp" />
<ClCompile Include="..\test\main.cpp" />
<ClCompile Include="..\test\MemTrie.cpp" />
<ClCompile Include="..\test\peer.cpp" />
<ClCompile Include="..\test\rlp.cpp" />
<ClCompile Include="..\test\state.cpp" />
<ClCompile Include="..\test\trie.cpp" />
<ClCompile Include="..\test\TrieHash.cpp" />
<ClCompile Include="..\test\vm.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
@ -173,6 +175,9 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\test\JsonSpiritHeaders.h" />
<ClInclude Include="..\test\MemTrie.h" />
<ClInclude Include="..\test\TrieHash.h" />
<ClInclude Include="stdafx.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

19
windows/TestEthereum.vcxproj.filters

@ -1,18 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Windows</Filter>
</ClCompile>
<ClCompile Include="..\test\rlp.cpp" />
<ClCompile Include="..\test\state.cpp" />
<ClCompile Include="..\test\trie.cpp" />
<ClCompile Include="..\test\TrieHash.cpp" />
<ClCompile Include="..\test\vm.cpp" />
<ClCompile Include="..\test\crypto.cpp" />
<ClCompile Include="..\test\dagger.cpp" />
<ClCompile Include="..\test\hexPrefix.cpp" />
<ClCompile Include="..\test\main.cpp" />
<ClCompile Include="..\test\MemTrie.cpp" />
<ClCompile Include="..\test\peer.cpp" />
<ClCompile Include="..\test\rlp.cpp" />
<ClCompile Include="..\test\state.cpp" />
<ClCompile Include="..\test\trie.cpp" />
<ClCompile Include="..\test\vm.cpp" />
<ClCompile Include="stdafx.cpp">
<Filter>Windows</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Windows">
@ -23,5 +25,8 @@
<ClInclude Include="stdafx.h">
<Filter>Windows</Filter>
</ClInclude>
<ClInclude Include="..\test\TrieHash.h" />
<ClInclude Include="..\test\MemTrie.h" />
<ClInclude Include="..\test\JsonSpiritHeaders.h" />
</ItemGroup>
</Project>

33
windows/Walleth.vcxproj

@ -170,17 +170,17 @@
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\walleth\MainWin.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(Lua)" moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Lua) moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)moc_%(FileName).cpp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(Lua)" moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Lua) moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(Lua)" moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Lua) moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(Lua)" moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Lua) moc.lua "$(QtBin)/moc" "$(IntDir)moc_%(FileName).cpp" "@(ClCompile->'%(AdditionalIncludeDirectories)');$(IncludePath)" "@(ClCompile->'%(PreprocessorDefinitions)');_MSC_VER=1800" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)moc_%(FileName).cpp</Outputs>
@ -206,6 +206,31 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)ui_%(FileName).h</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="BuildInfo.lua">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Lua) "%(FullPath)" "$(IntDir)%(FileName).h"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(FileName).h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(FileName).h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)%(FileName).h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(FileName).h</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../.git/index</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../.git/index</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../.git/index</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../.git/index</AdditionalInputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

3
windows/Walleth.vcxproj.filters

@ -14,6 +14,9 @@
<ItemGroup>
<CustomBuild Include="..\walleth\MainWin.h" />
<CustomBuild Include="..\walleth\Main.ui" />
<CustomBuild Include="BuildInfo.lua">
<Filter>Windows</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<Filter Include="Windows">

2
windows/WinMain.cpp

@ -5,7 +5,7 @@
extern int main(int argc, char* argv[]);
int WINAPI WinMain(HINSTANCE instance, HINSTANCE prev_instance, char* command_line, int show_command)
int WINAPI WinMain(HINSTANCE /*instance*/, HINSTANCE /*prev_instance*/, char* command_line, int /*show_command*/)
{
int argc;
char** argv;

32
windows/stdafx.h

@ -21,24 +21,40 @@
#pragma once
#include <ctime>
#include <chrono>
#include <string>
#include <array>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <array>
#include <list>
#include <map>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <ctime>
#include <chrono>
#include <cassert>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdint>
#include <type_traits>
#include <mutex>
#include <atomic>
#include <random>
#include <exception>
#include <memory>
#include <algorithm>
#include <assert.h>
#include <boost/filesystem.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/thread.hpp>
#include <boost/asio/detail/socket_types.hpp>
#include <boost/thread.hpp>
#pragma warning(push)
#pragma warning(disable: 4100 4267)
#include <leveldb/db.h>
#pragma warning(pop)

Loading…
Cancel
Save