aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4d95c49692..5f38fcfc23 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3234,7 +3234,7 @@ uint64 nLastBlockSize = 0;
CBlock* CreateNewBlock(CReserveKey& reservekey)
{
- CBlockIndex* pindexPrev = pindexBest;
+ CBlockIndex* pindexPrev;
// Create new block
auto_ptr<CBlock> pblock(new CBlock());
@@ -3256,6 +3256,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
CRITICAL_BLOCK(cs_main)
CRITICAL_BLOCK(cs_mapTransactions)
{
+ pindexPrev = pindexBest;
CTxDB txdb("r");
// Priority order to process transactions