Browse Source

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

cl-refactor
Gav Wood 10 years ago
parent
commit
94579c6082
  1. 14
      libethash-cl/ethash_cl_miner.cpp
  2. 4
      libethereum/EthereumHost.cpp

14
libethash-cl/ethash_cl_miner.cpp

@ -267,9 +267,19 @@ bool ethash_cl_miner::init(
ETHCL_LOG("Using device: " << device.getInfo<CL_DEVICE_NAME>().c_str() << "(" << device_version.c_str() << ")");
// configure chunk number depending on max allocateable memory
cl_ulong result;
cl_ulong result;
device.getInfo(CL_DEVICE_MAX_MEM_ALLOC_SIZE, &result);
m_dagChunksNum = result >= ETHASH_CL_MINIMUM_MEMORY ? 4 : 1;
if (result >= ETHASH_CL_MINIMUM_MEMORY)
{
m_dagChunksNum = 1;
ETHCL_LOG("Using 1 big chunk. Max OpenCL allocateable memory is" << result);
}
else
{
m_dagChunksNum = 4;
ETHCL_LOG("Using 4 chunks. Max OpenCL allocateable memory is" << result);
}
if (strncmp("OpenCL 1.0", device_version.c_str(), 10) == 0)
{
ETHCL_LOG("OpenCL 1.0 is not supported.");

4
libethereum/EthereumHost.cpp

@ -368,7 +368,7 @@ void EthereumHost::onPeerHashes(EthereumPeer* _peer, h256s const& _hashes, bool
if (_complete)
{
m_needSyncBlocks = true;
continueSync(_peer);
continueSync();
}
else if (syncByNumber && m_hashMan.isComplete())
{
@ -541,7 +541,7 @@ void EthereumHost::onPeerNewBlock(EthereumPeer* _peer, RLP const& _r)
_peer->m_knownBlocks.insert(h);
if (sync)
continueSync(_peer);
continueSync();
}
}

Loading…
Cancel
Save