aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-05-09 17:24:44 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-05-27 12:27:33 +0000
commit3cd01fdf0e540c4e06cd27b6c0d6b6abc00767d1 (patch)
treede9998af091e4c6d844db2f91701e66d491b05e1 /src/main.h
parenta1c3d8f14dca6a86fa103d86ef125e95372f860c (diff)
CreateNewBlock: Check that the produced CBlock is acceptable (except for proof-of-work and merkletree, since those need to be provided later)
This throws an exception from CreateNewBlock otherwise, which is not safe without #1245!
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.h b/src/main.h
index 18d5dbdd74..996b727b62 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1017,11 +1017,11 @@ public:
bool DisconnectBlock(CTxDB& txdb, CBlockIndex* pindex);
- bool ConnectBlock(CTxDB& txdb, CBlockIndex* pindex);
+ bool ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck=false);
bool ReadFromDisk(const CBlockIndex* pindex, bool fReadTransactions=true);
bool SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew);
bool AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos);
- bool CheckBlock() const;
+ bool CheckBlock(bool fCheckPOW=true, bool fCheckMerkleRoot=true) const;
bool AcceptBlock();
private: