Browse Source

partialy revert changeset 77d1a4fb. fixed one case (that -reindex would fix anyway) but broke another one.

miguelfreitas
Miguel Freitas 11 years ago
parent
commit
4c25acc6af
  1. 2
      src/clientversion.h
  2. 10
      src/main.cpp

2
src/clientversion.h

@ -8,7 +8,7 @@
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 9 #define CLIENT_VERSION_MINOR 9
#define CLIENT_VERSION_REVISION 02 #define CLIENT_VERSION_REVISION 03
#define CLIENT_VERSION_BUILD 0 #define CLIENT_VERSION_BUILD 0
// Set to true for release, false for prerelease or test build // Set to true for release, false for prerelease or test build

10
src/main.cpp

@ -1336,16 +1336,6 @@ bool SetBestChain(CValidationState &state, CBlockIndex* pindexNew)
int64 nStart = GetTimeMicros(); int64 nStart = GetTimeMicros();
if (!ConnectBlock(block, state, pindex, view)) { if (!ConnectBlock(block, state, pindex, view)) {
if (state.IsInvalid()) { if (state.IsInvalid()) {
// [MF] invalidate all pindex between pindexNew and pindex
// trying to fix infinite recursion in SetBestChain.
CBlockIndex *pinvalid = pindexNew;
do {
pinvalid->nStatus |= BLOCK_FAILED_CHILD;
pblocktree->WriteBlockIndex(CDiskBlockIndex(pinvalid));
setBlockIndexValid.erase(pinvalid);
pinvalid = pinvalid->pprev;
} while( pinvalid != NULL && pinvalid != pindex);
InvalidChainFound(pindexNew); InvalidChainFound(pindexNew);
InvalidBlockFound(pindex); InvalidBlockFound(pindex);
} }

Loading…
Cancel
Save