Skip to content

Commit

Permalink
Log merkle save and submitted to getwork
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar committed Oct 25, 2019
1 parent b63eec3 commit 0a4ea5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,8 @@ UniValue getwork(const UniValue& params, bool fHelp)
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);

// Save
LogPrintf("%s: mapNewBlock save hashMerkleRoot: %s, with extraNonce: %i, total: %i\n", __func__, pblock->hashMerkleRoot.ToString(), nExtraNonce, mapNewBlock.size());
LogPrintf("%s: mapNewBlock save hashMerkleRoot: %s\n", __func__, pblock->hashMerkleRoot.ToString());
mapNewBlock[pblock->hashMerkleRoot] = std::make_pair(pblock, pblock->vtx[0].vin[0].scriptSig);
LogPrintf("%s: getwork Block created: %s\n", __func__, pblock->ToString());

// Pre-build hash buffers
unsigned int pdata[32];
Expand All @@ -428,6 +427,8 @@ UniValue getwork(const UniValue& params, bool fHelp)

CBlock* pdata = (CBlock*) &vchData[0];

LogPrintf("%s: getwork Block created merkle root: %s\n", __func__, pdata->hashMerkleRoot.ToString());

/* Pick up the block contents saved previously */
if(!mapNewBlock.count(pdata->hashMerkleRoot))
throw JSONRPCError(RPC_INTERNAL_ERROR, "Couldn't find saved previously block.");
Expand Down

0 comments on commit 0a4ea5b

Please sign in to comment.