@ -454,8 +454,7 @@ bool CTransaction::AreInputsStandard(CCoinsViewCache& mapInputs) const
@@ -454,8 +454,7 @@ bool CTransaction::AreInputsStandard(CCoinsViewCache& mapInputs) const
return true ;
}
unsigned int
CTransaction : : GetLegacySigOpCount ( ) const
unsigned int CTransaction : : GetLegacySigOpCount ( ) const
{
unsigned int nSigOps = 0 ;
BOOST_FOREACH ( const CTxIn & txin , vin )
@ -1176,7 +1175,7 @@ int GetNumBlocksOfPeers()
@@ -1176,7 +1175,7 @@ int GetNumBlocksOfPeers()
bool IsInitialBlockDownload ( )
{
if ( pindexBest = = NULL | | nBestHeight < Checkpoints : : GetTotalBlocksEstimate ( ) | | fReindex | | fImporting )
if ( pindexBest = = NULL | | fImporting | | fReindex | | nBestHeight < Checkpoints : : GetTotalBlocksEstimate ( ) )
return true ;
static int64 nLastUpdate ;
static CBlockIndex * pindexLastBest ;
@ -1629,7 +1628,6 @@ bool CBlock::ConnectBlock(CValidationState &state, CBlockIndex* pindex, CCoinsVi
@@ -1629,7 +1628,6 @@ bool CBlock::ConnectBlock(CValidationState &state, CBlockIndex* pindex, CCoinsVi
vPos . reserve ( vtx . size ( ) ) ;
for ( unsigned int i = 0 ; i < vtx . size ( ) ; i + + )
{
const CTransaction & tx = vtx [ i ] ;
nInputs + = tx . vin . size ( ) ;
@ -2444,7 +2442,7 @@ bool AbortNode(const std::string &strMessage) {
@@ -2444,7 +2442,7 @@ bool AbortNode(const std::string &strMessage) {
fRequestShutdown = true ;
strMiscWarning = strMessage ;
printf ( " *** %s \n " , strMessage . c_str ( ) ) ;
uiInterface . ThreadSafeMessageBox ( strMessage , " " , CClientUIInterface : : MSG_ERROR | CClientUIInterface : : MODAL ) ;
uiInterface . ThreadSafeMessageBox ( strMessage , " " , CClientUIInterface : : MSG_ERROR ) ;
StartShutdown ( ) ;
return false ;
}
@ -2543,9 +2541,9 @@ bool static LoadBlockIndexDB()
@@ -2543,9 +2541,9 @@ bool static LoadBlockIndexDB()
// Load block file info
pblocktree - > ReadLastBlockFile ( nLastBlockFile ) ;
printf ( " LoadBlockIndex(): last block file = %i \n " , nLastBlockFile ) ;
printf ( " LoadBlockIndexDB (): last block file = %i \n " , nLastBlockFile ) ;
if ( pblocktree - > ReadBlockFileInfo ( nLastBlockFile , infoLastBlockFile ) )
printf ( " LoadBlockIndex(): last block file: %s \n " , infoLastBlockFile . ToString ( ) . c_str ( ) ) ;
printf ( " LoadBlockIndexDB (): last block file info : %s \n " , infoLastBlockFile . ToString ( ) . c_str ( ) ) ;
// Load bnBestInvalidWork, OK if it doesn't exist
pblocktree - > ReadBestInvalidWork ( bnBestInvalidWork ) ;
@ -2557,7 +2555,7 @@ bool static LoadBlockIndexDB()
@@ -2557,7 +2555,7 @@ bool static LoadBlockIndexDB()
// Check whether we have a transaction index
pblocktree - > ReadFlag ( " txindex " , fTxIndex ) ;
printf ( " LoadBlockIndex(): transaction index %s \n " , fTxIndex ? " enabled " : " disabled " ) ;
printf ( " LoadBlockIndexDB (): transaction index %s \n " , fTxIndex ? " enabled " : " disabled " ) ;
// Load hashBestChain pointer to end of best chain
pindexBest = pcoinsTip - > GetBestBlock ( ) ;
@ -2574,7 +2572,7 @@ bool static LoadBlockIndexDB()
@@ -2574,7 +2572,7 @@ bool static LoadBlockIndexDB()
pindexPrev - > pnext = pindex ;
pindex = pindexPrev ;
}
printf ( " LoadBlockIndex(): hashBestChain=%s height=%d date=%s \n " ,
printf ( " LoadBlockIndexDB (): hashBestChain=%s height=%d date=%s \n " ,
BlockHashStr ( hashBestChain ) . c_str ( ) , nBestHeight ,
DateTimeStrFormat ( " %Y-%m-%d %H:%M:%S " , pindexBest - > GetBlockTime ( ) ) . c_str ( ) ) ;
@ -2743,7 +2741,7 @@ bool InitBlockIndex() {
@@ -2743,7 +2741,7 @@ bool InitBlockIndex() {
CDiskBlockPos blockPos ;
CValidationState state ;
if ( ! FindBlockPos ( state , blockPos , nBlockSize + 8 , 0 , block . nTime ) )
return error ( " AcceptBlock () : FindBlockPos failed " ) ;
return error ( " LoadBlockIndex () : FindBlockPos failed " ) ;
if ( ! block . WriteToDisk ( blockPos ) )
return error ( " LoadBlockIndex() : writing genesis block to disk failed " ) ;
if ( ! block . AddToBlockIndex ( state , blockPos ) )