Browse Source

Merge branch 'develop' of github.com:ethereum/cpp-ethereum into develop

cl-refactor
Gav Wood 10 years ago
parent
commit
9e720b7603
  1. 2
      alethzero/MainWin.cpp
  2. 2
      cmake/EthCompilerSettings.cmake
  3. 14
      libdevcore/Common.h
  4. 1
      libethereum/EthereumHost.cpp
  5. 1
      libethereum/EthereumPeer.cpp

2
alethzero/MainWin.cpp

@ -1899,7 +1899,7 @@ void Main::on_net_triggered()
{
web3()->setIdealPeerCount(ui->idealPeers->value());
web3()->setNetworkPreferences(netPrefs(), ui->dropPeers->isChecked());
ethereum()->setNetworkId(m_privateChain.size() ? sha3(m_privateChain.toStdString()) : h256(u256(42)));
ethereum()->setNetworkId(m_privateChain.size() ? sha3(m_privateChain.toStdString()) : h256());
web3()->startNetwork();
ui->downloadView->setDownloadMan(ethereum()->downloadMan());
ui->enode->setText(QString::fromStdString(web3()->enode()));

2
cmake/EthCompilerSettings.cmake

@ -44,7 +44,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification
# warning LNK4099: pdb was not found with lib
# stack size 16MB
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099,4075 /STACK:16777216")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099,4075 /STACK:33554432")
# windows likes static
if (NOT ETH_STATIC)

14
libdevcore/Common.h

@ -85,6 +85,20 @@ using u160s = std::vector<u160>;
using u256Set = std::set<u256>;
using u160Set = std::set<u160>;
// Workaround for mixed type big int comparison bug introduced in boost 1.58
// https://svn.boost.org/trac/boost/ticket/11328
#define ETH_BIGINT_WRONG_COMPARISON_WORKAROUND(_OP) \
template<typename _T, typename _U> auto operator _OP (_T const& a, _U const& b) -> typename std::enable_if<std::is_same<_T, u256>::value && std::is_same<_U, bigint>::value, bool>::type { return (bigint)a _OP b; } \
template<typename _T, typename _U> auto operator _OP (_U const& a, _T const& b) -> typename std::enable_if<std::is_same<_T, u256>::value && std::is_same<_U, bigint>::value, bool>::type { return a _OP (bigint)b; }
ETH_BIGINT_WRONG_COMPARISON_WORKAROUND(==)
ETH_BIGINT_WRONG_COMPARISON_WORKAROUND(!=)
ETH_BIGINT_WRONG_COMPARISON_WORKAROUND(>=)
ETH_BIGINT_WRONG_COMPARISON_WORKAROUND(<=)
ETH_BIGINT_WRONG_COMPARISON_WORKAROUND(<)
ETH_BIGINT_WRONG_COMPARISON_WORKAROUND(>)
extern const u256 UndefinedU256;
// Map types.

1
libethereum/EthereumHost.cpp

@ -241,6 +241,7 @@ void EthereumHost::onPeerStatus(EthereumPeer* _peer)
_peer->disable("Peer banned for previous bad behaviour.");
else
{
_peer->m_protocolVersion = EthereumHost::c_oldProtocolVersion; //force V60 for now
if (_peer->m_protocolVersion != protocolVersion())
estimatePeerHashes(_peer);
else if (_peer->m_latestBlockNumber > m_chain.number())

1
libethereum/EthereumPeer.cpp

@ -40,6 +40,7 @@ EthereumPeer::EthereumPeer(Session* _s, HostCapabilityFace* _h, unsigned _i, Cap
m_hashSub(host()->hashDownloadMan()),
m_peerCapabilityVersion(_cap.second)
{
m_peerCapabilityVersion = EthereumHost::c_oldProtocolVersion;
m_syncHashNumber = host()->chain().number() + 1;
requestStatus();
}

Loading…
Cancel
Save