Browse Source

Merge branch 'master' into develop

cl-refactor
Gav Wood 10 years ago
parent
commit
5379afef8d
  1. 4
      libethereum/EthereumHost.cpp
  2. 1
      libp2p/Host.cpp
  3. 2
      libqethereum/CMakeLists.txt
  4. 1
      sc/cmdline.cpp
  5. 6
      windows/LibEthereum.vcxproj.filters

4
libethereum/EthereumHost.cpp

@ -183,7 +183,7 @@ void EthereumHost::doWork()
void EthereumHost::maintainTransactions(TransactionQueue& _tq, h256 _currentHash) void EthereumHost::maintainTransactions(TransactionQueue& _tq, h256 _currentHash)
{ {
bool resendAll = (_currentHash != m_latestBlockSent); bool resendAll = (m_grabbing == Grabbing::Nothing && m_chain.isKnown(m_latestBlockSent) && _currentHash != m_latestBlockSent);
{ {
lock_guard<recursive_mutex> l(m_incomingLock); lock_guard<recursive_mutex> l(m_incomingLock);
for (auto it = m_incomingTransactions.begin(); it != m_incomingTransactions.end(); ++it) for (auto it = m_incomingTransactions.begin(); it != m_incomingTransactions.end(); ++it)
@ -251,7 +251,7 @@ void EthereumHost::maintainBlocks(BlockQueue& _bq, h256 _currentHash)
} }
// If we've finished our initial sync send any new blocks. // If we've finished our initial sync send any new blocks.
if (m_grabbing == Grabbing::Nothing && m_chain.details(m_latestBlockSent) && m_chain.details(m_latestBlockSent).totalDifficulty < m_chain.details(_currentHash).totalDifficulty) if (m_grabbing == Grabbing::Nothing && m_chain.isKnown(m_latestBlockSent) && m_chain.details(m_latestBlockSent).totalDifficulty < m_chain.details(_currentHash).totalDifficulty)
{ {
RLPStream ts; RLPStream ts;
EthereumPeer::prep(ts); EthereumPeer::prep(ts);

1
libp2p/Host.cpp

@ -381,6 +381,7 @@ void Host::connect(std::string const& _addr, unsigned short _port) noexcept
} }
else else
connect(bi::tcp::endpoint(bi::address::from_string(_addr), _port)); connect(bi::tcp::endpoint(bi::address::from_string(_addr), _port));
break;
} }
catch (exception const& e) catch (exception const& e)
{ {

2
libqethereum/CMakeLists.txt

@ -105,6 +105,6 @@ else ()
target_link_libraries(${EXECUTABLE} boost_filesystem) target_link_libraries(${EXECUTABLE} boost_filesystem)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin ) install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
endif () endif ()

1
sc/cmdline.cpp

@ -3,6 +3,7 @@
#include <iostream> #include <iostream>
#include <vector> #include <vector>
#include <map> #include <map>
#include <string>
#include <libserpent/funcs.h> #include <libserpent/funcs.h>
int main(int argv, char** argc) { int main(int argv, char** argc) {

6
windows/LibEthereum.vcxproj.filters

@ -175,6 +175,9 @@
<ClCompile Include="..\libwhisper\WhisperPeer.cpp"> <ClCompile Include="..\libwhisper\WhisperPeer.cpp">
<Filter>libwhisper</Filter> <Filter>libwhisper</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\libethereum\Manifest.cpp">
<Filter>libethereum</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="stdafx.h"> <ClInclude Include="stdafx.h">
@ -384,6 +387,9 @@
<ClInclude Include="..\libwhisper\WhisperPeer.h"> <ClInclude Include="..\libwhisper\WhisperPeer.h">
<Filter>libwhisper</Filter> <Filter>libwhisper</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\libethereum\Manifest.h">
<Filter>libethereum</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Filter Include="Windows"> <Filter Include="Windows">

Loading…
Cancel
Save