// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2011 The Bitcoin developers
-// Copyright (c) 2011 The PPCoin developers
+// Copyright (c) 2011-2012 The PPCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
return Read(string("nAutoCheckpoint"), nAutoCheckpoint);
}
-bool CTxDB::WriteAutoCheckpoint(int nCheckpoint)
+bool CTxDB::WriteAutoCheckpoint(int nCheckpoint, bool fReset)
{
- return Write(string("nAutoCheckpoint"), max(Checkpoints::nAutoCheckpoint, nCheckpoint));
+ nCheckpoint = fReset? nCheckpoint : max(Checkpoints::nAutoCheckpoint, nCheckpoint);
+ return Write(string("nAutoCheckpoint"), nCheckpoint);
}
CBlockIndex static * InsertBlockIndex(uint256 hash)
pindexNew->nBlockPos = diskindex.nBlockPos;
pindexNew->nChainTrust = diskindex.nChainTrust;
pindexNew->nHeight = diskindex.nHeight;
+ pindexNew->nCheckpoint = diskindex.nCheckpoint;
+ pindexNew->fProofOfStake = diskindex.fProofOfStake;
pindexNew->nVersion = diskindex.nVersion;
pindexNew->hashMerkleRoot = diskindex.hashMerkleRoot;
pindexNew->nTime = diskindex.nTime;
if (strKey == "fUseProxy") ssValue >> fUseProxy;
if (strKey == "addrProxy") ssValue >> addrProxy;
if (fHaveUPnP && strKey == "fUseUPnP") ssValue >> fUseUPnP;
+ if (strKey == "nBalanceReserve") ssValue >> nBalanceReserve;
}
else if (strType == "minversion")
{