diff options
| author | jnewbery <[email protected]> | 2016-09-27 13:40:16 -0400 |
|---|---|---|
| committer | jnewbery <[email protected]> | 2016-10-03 13:55:26 -0400 |
| commit | 5f274a1749acfdf331bc2931e25ac80c346e5faa (patch) | |
| tree | 733670bba001b48a793406fe6beefd3aadafb3e4 /src/miner.cpp | |
| parent | Merge #8810: tests: Add exception error message for JSONRPCException (diff) | |
| download | discoin-5f274a1749acfdf331bc2931e25ac80c346e5faa.tar.xz discoin-5f274a1749acfdf331bc2931e25ac80c346e5faa.zip | |
log block size and weight correctly.
Diffstat (limited to 'src/miner.cpp')
| -rw-r--r-- | src/miner.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index 957585884..6cb40dae8 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -168,7 +168,6 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn) nLastBlockTx = nBlockTx; nLastBlockSize = nBlockSize; nLastBlockWeight = nBlockWeight; - LogPrintf("CreateNewBlock(): total size %u txs: %u fees: %ld sigops %d\n", nBlockSize, nBlockTx, nFees, nBlockSigOpsCost); // Create coinbase transaction. CMutableTransaction coinbaseTx; @@ -182,6 +181,9 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn) pblocktemplate->vchCoinbaseCommitment = GenerateCoinbaseCommitment(*pblock, pindexPrev, chainparams.GetConsensus()); pblocktemplate->vTxFees[0] = -nFees; + uint64_t nSerializeSize = GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION); + LogPrintf("CreateNewBlock(): total size: %u block weight: %u txs: %u fees: %ld sigops %d\n", nSerializeSize, GetBlockWeight(*pblock), nBlockTx, nFees, nBlockSigOpsCost); + // Fill in header pblock->hashPrevBlock = pindexPrev->GetBlockHash(); UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev); |