From 03cac0bb8e9cab02c456cbe71a0519aec92a6150 Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Wed, 19 Dec 2012 15:21:21 -0500 Subject: changed CreateNewBlock to return a CBlockTemplate object, which includes per-tx fee and sigop count data --- src/main.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main.h') diff --git a/src/main.h b/src/main.h index 8bceffbaf9..d34778d12f 100644 --- a/src/main.h +++ b/src/main.h @@ -108,6 +108,8 @@ class CTxUndo; class CCoinsView; class CCoinsViewCache; +struct CBlockTemplate; + /** Register a wallet to receive updates from core */ void RegisterWallet(CWallet* pwalletIn); /** Unregister a wallet from core */ @@ -139,7 +141,7 @@ void ThreadImport(void *parg); /** Run the miner threads */ void GenerateBitcoins(bool fGenerate, CWallet* pwallet); /** Generate a new block, without valid proof-of-work */ -CBlock* CreateNewBlock(CReserveKey& reservekey); +CBlockTemplate* CreateNewBlock(CReserveKey& reservekey); /** Modify the extranonce in a block */ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce); /** Do mining precalculation */ @@ -1975,4 +1977,11 @@ extern CCoinsViewCache *pcoinsTip; /** Global variable that points to the active block tree (protected by cs_main) */ extern CBlockTreeDB *pblocktree; +struct CBlockTemplate +{ + CBlock block; + std::vector vTxFees; + std::vector vTxSigOps; +}; + #endif -- cgit v1.2.3