cleanup
This commit is contained in:
@@ -1186,10 +1186,6 @@ void static RandomXMiner()
|
|||||||
// since magic is 4 bytes, rpc port is 4 bytes and smart chain symbol must be at least 1 character long
|
// since magic is 4 bytes, rpc port is 4 bytes and smart chain symbol must be at least 1 character long
|
||||||
snprintf(randomxKey, 81, "%08x%s%08x", ASSETCHAINS_MAGIC, SMART_CHAIN_SYMBOL, ASSETCHAINS_RPCPORT);
|
snprintf(randomxKey, 81, "%08x%s%08x", ASSETCHAINS_MAGIC, SMART_CHAIN_SYMBOL, ASSETCHAINS_RPCPORT);
|
||||||
|
|
||||||
//char randomxInput[80];
|
|
||||||
//std::string randomxInput;
|
|
||||||
//sprintf(randomxInput, "%08x Extreme Privacy Hush Smart Chain %08x", ASSETCHAINS_MAGIC, ASSETCHAINS_MAGIC);
|
|
||||||
|
|
||||||
CDataStream randomxInput(SER_NETWORK, PROTOCOL_VERSION);
|
CDataStream randomxInput(SER_NETWORK, PROTOCOL_VERSION);
|
||||||
// Use the current block as randomx input
|
// Use the current block as randomx input
|
||||||
randomxInput << pblocktemplate->block;
|
randomxInput << pblocktemplate->block;
|
||||||
@@ -1224,9 +1220,6 @@ void static RandomXMiner()
|
|||||||
int keyHeight = ((Mining_height - randomxBlockLag) / randomxInterval) * randomxInterval;
|
int keyHeight = ((Mining_height - randomxBlockLag) / randomxInterval) * randomxInterval;
|
||||||
fprintf(stderr,"RandomXMiner: key height=%d\n", keyHeight);
|
fprintf(stderr,"RandomXMiner: key height=%d\n", keyHeight);
|
||||||
uint256 randomxBlockKey = chainActive[keyHeight]->GetBlockHash();
|
uint256 randomxBlockKey = chainActive[keyHeight]->GetBlockHash();
|
||||||
//crypto_generichash_blake2b_state new_state;
|
|
||||||
//crypto_generichash_blake2b_update(&new_state, (unsigned char *)&randomxBlockKey, 32);
|
|
||||||
//crypto_generichash_blake2b_final(&new_state, randomxInput, 32);
|
|
||||||
|
|
||||||
randomx_init_cache(randomxCache, &randomxBlockKey, sizeof randomxBlockKey);
|
randomx_init_cache(randomxCache, &randomxBlockKey, sizeof randomxBlockKey);
|
||||||
fprintf(stderr,"RandomXMiner: initialized cache with randomxBlockKey=%s\n", randomxBlockKey.ToString().c_str());
|
fprintf(stderr,"RandomXMiner: initialized cache with randomxBlockKey=%s\n", randomxBlockKey.ToString().c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user