aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-16 18:46:02 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-16 18:46:02 +0000
commit44a0de1861a78a693ad3331f0f7b06003a78a9d7 (patch)
treed45c08f097bb8862e5114b99a9229b85ec7d469b /main.cpp
parenta01d5876fa6a9a9fe28cff3ad3ed0e91d5612125 (diff)
do an extra CheckBlock in ConnectBlock
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@139 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 6311735e64..9305fb7085 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1107,6 +1107,10 @@ bool CBlock::DisconnectBlock(CTxDB& txdb, CBlockIndex* pindex)
bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex)
{
+ // Check it again in case a previous version let a bad block in
+ if (!CheckBlock())
+ return false;
+
//// issue here: it doesn't know the version
unsigned int nTxPos = pindex->nBlockPos + ::GetSerializeSize(CBlock(), SER_DISK) - 1 + GetSizeOfCompactSize(vtx.size());