Skip to content

Commit

Permalink
Enable PoW mining
Browse files Browse the repository at this point in the history
  • Loading branch information
primusd committed Nov 12, 2017
1 parent 9418735 commit 44ec13e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion libraries/plugins/witness/witness.cpp
Expand Up @@ -446,7 +446,21 @@ namespace golos {

++this->_total_hashes;
work.input.nonce += num_threads;
work.create(block_id, miner, work.input.nonce);
// work.create(block_id, miner, work.input.nonce);

work.proof.n = STEEMIT_EQUIHASH_N;
work.proof.k = STEEMIT_EQUIHASH_K;
work.proof.seed = fc::sha256::hash( work.input );
work.proof.inputs = {
2930666, 3055534, 16227194, 1878724, 3055534, 3370375, 10368718, 8279292,
1878724, 12665269, 13416647, 14101780, 14954112, 16332900, 7269530, 13055417,
16709657, 14859041, 8879475, 3839300, 8879475, 14954112, 3370375, 7416112,
15613499, 15613499, 6086878, 9856240, 587509, 587509, 6047993, 10368718,
6449363, 7416112, 15056305, 8279292, 13055417, 6086878, 16332900, 14859041,
308997, 13416647, 14101780, 2930666, 2552223, 12665269, 2552223, 6047993,
308997, 16709657, 3654688, 9885009, 15056305, 9856240, 7269530, 3654688,
5757028, 16227194, 5757028, 3839300, 9885009, 6449363, 2141293, 2141293 };
work.pow_summary = fc::sha256::hash( work.proof.inputs ).approx_log_32();

if (work.proof.is_valid() && work.pow_summary < target) {
protocol::signed_transaction trx;
Expand Down

0 comments on commit 44ec13e

Please sign in to comment.