@ -1039,7 +1039,7 @@ bool CTransaction::DisconnectInputs(CTxDB& txdb)
// Remove transaction from index
// Remove transaction from index
// This can fail if a duplicate of this transaction was in a chain that got
// This can fail if a duplicate of this transaction was in a chain that got
// reorganized away. This is only possible if this transaction was completely
// reorganized away. This is only possible if this transaction was completely
// spent, so erasing it would be a no-op anway.
// spent, so erasing it would be a no-op any way.
txdb . EraseTxIndex ( * this ) ;
txdb . EraseTxIndex ( * this ) ;
return true ;
return true ;
@ -1604,7 +1604,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew)
return error ( " SetBestChain() : Reorganize failed " ) ;
return error ( " SetBestChain() : Reorganize failed " ) ;
}
}
// Connect futher blocks
// Connect fur ther blocks
BOOST_REVERSE_FOREACH ( CBlockIndex * pindex , vpindexSecondary )
BOOST_REVERSE_FOREACH ( CBlockIndex * pindex , vpindexSecondary )
{
{
CBlock block ;
CBlock block ;
@ -1805,7 +1805,7 @@ bool CBlock::AcceptBlock()
// Check that the block chain matches the known block chain up to a checkpoint
// Check that the block chain matches the known block chain up to a checkpoint
if ( ! Checkpoints : : CheckBlock ( nHeight , hash ) )
if ( ! Checkpoints : : CheckBlock ( nHeight , hash ) )
return DoS ( 100 , error ( " AcceptBlock() : rejected by checkpoint lockin at % d " , nHeight)) ;
return DoS ( 100 , error ( " AcceptBlock() : rejected by checkpoint lock - in at % d " , nHeight)) ;
// Write block to history file
// Write block to history file
if ( ! CheckDiskSpace ( : : GetSerializeSize ( * this , SER_DISK , CLIENT_VERSION ) ) )
if ( ! CheckDiskSpace ( : : GetSerializeSize ( * this , SER_DISK , CLIENT_VERSION ) ) )
@ -2055,7 +2055,7 @@ bool LoadBlockIndex(bool fAllowNew)
void PrintBlockTree ( )
void PrintBlockTree ( )
{
{
// precompute tree structure
// pre- compute tree structure
map < CBlockIndex * , vector < CBlockIndex * > > mapNext ;
map < CBlockIndex * , vector < CBlockIndex * > > mapNext ;
for ( map < uint256 , CBlockIndex * > : : iterator mi = mapBlockIndex . begin ( ) ; mi ! = mapBlockIndex . end ( ) ; + + mi )
for ( map < uint256 , CBlockIndex * > : : iterator mi = mapBlockIndex . begin ( ) ; mi ! = mapBlockIndex . end ( ) ; + + mi )
{
{
@ -2108,7 +2108,7 @@ void PrintBlockTree()
PrintWallets ( block ) ;
PrintWallets ( block ) ;
// put the main timechain first
// put the main time- chain first
vector < CBlockIndex * > & vNext = mapNext [ pindex ] ;
vector < CBlockIndex * > & vNext = mapNext [ pindex ] ;
for ( unsigned int i = 0 ; i < vNext . size ( ) ; i + + )
for ( unsigned int i = 0 ; i < vNext . size ( ) ; i + + )
{
{
@ -2347,7 +2347,7 @@ bool static AlreadyHave(CTxDB& txdb, const CInv& inv)
// The message start string is designed to be unlikely to occur in normal data.
// The message start string is designed to be unlikely to occur in normal data.
// The characters are rarely used upper ascii , not valid as UTF-8, and produce
// The characters are rarely used upper ASCII , not valid as UTF-8, and produce
// a large 4-byte int at any alignment.
// a large 4-byte int at any alignment.
unsigned char pchMessageStart [ 4 ] = { 0xf9 , 0xbe , 0xb4 , 0xd9 } ;
unsigned char pchMessageStart [ 4 ] = { 0xf9 , 0xbe , 0xb4 , 0xd9 } ;
@ -3030,12 +3030,12 @@ bool ProcessMessages(CNode* pfrom)
{
{
if ( strstr ( e . what ( ) , " end of data " ) )
if ( strstr ( e . what ( ) , " end of data " ) )
{
{
// Allow exceptions from underlength message on vRecv
// Allow exceptions from under- length message on vRecv
printf ( " ProcessMessages(%s, %u bytes) : Exception '%s' caught, normally caused by a message being shorter than its stated length \n " , strCommand . c_str ( ) , nMessageSize , e . what ( ) ) ;
printf ( " ProcessMessages(%s, %u bytes) : Exception '%s' caught, normally caused by a message being shorter than its stated length \n " , strCommand . c_str ( ) , nMessageSize , e . what ( ) ) ;
}
}
else if ( strstr ( e . what ( ) , " size too large " ) )
else if ( strstr ( e . what ( ) , " size too large " ) )
{
{
// Allow exceptions from overlong size
// Allow exceptions from over- long size
printf ( " ProcessMessages(%s, %u bytes) : Exception '%s' caught \n " , strCommand . c_str ( ) , nMessageSize , e . what ( ) ) ;
printf ( " ProcessMessages(%s, %u bytes) : Exception '%s' caught \n " , strCommand . c_str ( ) , nMessageSize , e . what ( ) ) ;
}
}
else
else
@ -3284,9 +3284,9 @@ unsigned int static ScanHash_CryptoPP(char* pmidstate, char* pdata, char* phash1
unsigned int & nNonce = * ( unsigned int * ) ( pdata + 12 ) ;
unsigned int & nNonce = * ( unsigned int * ) ( pdata + 12 ) ;
for ( ; ; )
for ( ; ; )
{
{
// Crypto++ SHA- 256
// Crypto++ SHA256
// Hash pdata using pmidstate as the starting state into
// Hash pdata using pmidstate as the starting state into
// preformatted buffer phash1, then hash phash1 into phash
// pre- formatted buffer phash1, then hash phash1 into phash
nNonce + + ;
nNonce + + ;
SHA256Transform ( phash1 , pdata , pmidstate ) ;
SHA256Transform ( phash1 , pdata , pmidstate ) ;
SHA256Transform ( phash , phash1 , pSHA256InitState ) ;
SHA256Transform ( phash , phash1 , pSHA256InitState ) ;
@ -3623,7 +3623,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
void FormatHashBuffers ( CBlock * pblock , char * pmidstate , char * pdata , char * phash1 )
void FormatHashBuffers ( CBlock * pblock , char * pmidstate , char * pdata , char * phash1 )
{
{
//
//
// Prebuild hash buffers
// Pre- build hash buffers
//
//
struct
struct
{
{
@ -3751,7 +3751,7 @@ void static BitcoinMiner(CWallet *pwallet)
//
//
// Prebuild hash buffers
// Pre- build hash buffers
//
//
char pmidstatebuf [ 32 + 16 ] ; char * pmidstate = alignup < 16 > ( pmidstatebuf ) ;
char pmidstatebuf [ 32 + 16 ] ; char * pmidstate = alignup < 16 > ( pmidstatebuf ) ;
char pdatabuf [ 128 + 16 ] ; char * pdata = alignup < 16 > ( pdatabuf ) ;
char pdatabuf [ 128 + 16 ] ; char * pdata = alignup < 16 > ( pdatabuf ) ;
@ -3776,7 +3776,7 @@ void static BitcoinMiner(CWallet *pwallet)
unsigned int nHashesDone = 0 ;
unsigned int nHashesDone = 0 ;
unsigned int nNonceFound ;
unsigned int nNonceFound ;
// Crypto++ SHA- 256
// Crypto++ SHA256
nNonceFound = ScanHash_CryptoPP ( pmidstate , pdata + 64 , phash1 ,
nNonceFound = ScanHash_CryptoPP ( pmidstate , pdata + 64 , phash1 ,
( char * ) & hash , nHashesDone ) ;
( char * ) & hash , nHashesDone ) ;