do an extra CheckBlock in ConnectBlock
This commit is contained in:
committed by
Gavin Andresen
parent
21ca2d833b
commit
43deefa435
4
main.cpp
4
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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user