cerr<<"Selected GPU mining without having compiled with -DETHASHCL=1"<<endl;
exit(1);
#endif
}
if(mode==OperationMode::DAGInit)
doInitDAG(m_initDAG);
@ -344,10 +360,12 @@ public:
<<" --allow-opencl-cpu Allows CPU to be considered as an OpenCL device if the OpenCL platform supports it."<<endl
<<" --list-devices List the detected OpenCL devices and exit."<<endl
<<" --current-block Let the miner know the current block number at configuration time. Will help determine DAG size and required GPU memory."<<endl
#if ETH_ETHASHCL || !ETH_TRUE
<<" --cl-extragpu-mem Set the memory (in MB) you believe your GPU requires for stuff other than mining. Windows rendering e.t.c.."<<endl
<<" --cl-local-work Set the OpenCL local work size. Default is "<<toString(dev::eth::Ethash::defaultLocalWorkSize)<<endl
<<" --cl-global-work Set the OpenCL global work size as a multiple of the local work size. Default is "<<toString(dev::eth::Ethash::defaultGlobalWorkSizeMultiplier)<<" * "<<toString(dev::eth::Ethash::defaultLocalWorkSize)<<endl
<<" --cl-ms-per-batch Set the OpenCL target milliseconds per batch (global workgroup size). Default is "<<toString(dev::eth::Ethash::defaultMSPerBatch)<<". If 0 is given then no autoadjustment of global work size will happen"<<endl
<<" --cl-local-work Set the OpenCL local work size. Default is "<<toString(ethash_cl_miner::c_defaultLocalWorkSize)<<endl
<<" --cl-global-work Set the OpenCL global work size as a multiple of the local work size. Default is "<<toString(ethash_cl_miner::c_defaultGlobalWorkSizeMultiplier)<<" * "<<toString(ethash_cl_miner::c_defaultLocalWorkSize)<<endl
<<" --cl-ms-per-batch Set the OpenCL target milliseconds per batch (global workgroup size). Default is "<<toString(ethash_cl_miner::c_defaultMSPerBatch)<<". If 0 is given then no autoadjustment of global work size will happen"<<endl
#endif
;
}
@ -472,14 +490,14 @@ private:
for(unsignedi=0;!completed;++i)
{
if(current)
cnote<<"Mining on PoWhash"<<current.headerHash<<": "<<f.miningProgress();
minelog<<"Mining on PoWhash"<<current.headerHash<<": "<<f.miningProgress();
else
cnote<<"Getting work package...";
minelog<<"Getting work package...";
Json::Valuev=rpc.eth_getWork();
h256hh(v[0].asString());
h256newSeedHash(v[1].asString());
if(current.seedHash!=newSeedHash)
cnote<<"Grabbing DAG for"<<newSeedHash;
minelog<<"Grabbing DAG for"<<newSeedHash;
if(!(dag=EthashAux::full(newSeedHash,true,[&](unsigned_pc){cout<<"\rCreating DAG. "<<_pc<<"% done..."<<flush;return0;})))
/// Get number of pending transactions for account.
/// @returns Pending transaction count.
unsignedwaiting(Addressconst&_a)const;
/// Get top transactions from the queue. Returned transactions are not removed from the queue automatically.
/// @param _limit Max number of transactions to return.
/// @returns up to _limit transactions ordered by nonce and gas price.
TransactionstopTransactions(unsigned_limit)const;
/// Get a hash set of transactions in the queue
/// @returns A hash set of all transactions in the queue
h256HashknownTransactions()const;
/// Get max nonce for an account
/// @returns Max transaction nonce for account in the queue
u256maxNonce(Addressconst&_a)const;
/// Mark transaction as future. It wont be retured in topTransactions list until a transaction with a preceeding nonce is imported or marked with dropGood
/// @param _t Transaction hash
voidsetFuture(h256const&_t);
/// Drop a trasnaction from the list if exists and move following future trasnactions to current (if any)
/// @param _t Transaction hash
voiddropGood(Transactionconst&_t);
/// Clear the queue
voidclear();
/// Register a handler that will be called once there is a new transaction imported
TBOOST_REQUIRE_MESSAGE((s.length()>0),"Content of "+path.string()+" is empty. Have you cloned the 'tests' repo branch develop and set ETHEREUM_TEST_PATH to its path?");