Browse Source

cleanup

pull/151/head
Duke Leto 2 years ago
parent
commit
7dfa3f9475
  1. 7
      src/miner.cpp

7
src/miner.cpp

@ -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
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);
// Use the current block as randomx input
randomxInput << pblocktemplate->block;
@ -1224,9 +1220,6 @@ void static RandomXMiner()
int keyHeight = ((Mining_height - randomxBlockLag) / randomxInterval) * randomxInterval;
fprintf(stderr,"RandomXMiner: key height=%d\n", keyHeight);
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);
fprintf(stderr,"RandomXMiner: initialized cache with randomxBlockKey=%s\n", randomxBlockKey.ToString().c_str());

Loading…
Cancel
Save