aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-08-12 17:02:38 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-08-12 17:02:38 +0000
commit797d0b231bebcf2cfdb82f4d44b9a06ead2a6e3c (patch)
treee020813e04c0d63487147f9b586b34367bed9252 /src/main.cpp
parent5951d9fe3224b11ba9ae45df4fe44804ec0efd83 (diff)
parent9e98fe6f584d8bdd0ffe4d5dc5c0b908beb456db (diff)
downloadbitcoin-797d0b231bebcf2cfdb82f4d44b9a06ead2a6e3c.tar.xz
Merge branch '0.4.x' into 0.5.x
Conflicts: src/net.cpp
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/main.cpp b/src/main.cpp
index e1acf59d40..0e6830e465 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -894,7 +894,7 @@ bool CTransaction::DisconnectInputs(CTxDB& txdb)
// Remove transaction from index
// 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
- // spent, so erasing it would be a no-op anway.
+ // spent, so erasing it would be a no-op anyway.
txdb.EraseTxIndex(*this);
return true;
@@ -1536,7 +1536,7 @@ bool CBlock::CheckBlock() const
if (GetSigOpCount() > MAX_BLOCK_SIGOPS)
return DoS(100, error("CheckBlock() : out-of-bounds SigOpCount"));
- // Check merkleroot
+ // Check merkle root
if (hashMerkleRoot != BuildMerkleTree())
return DoS(100, error("CheckBlock() : hashMerkleRoot mismatch"));
@@ -1728,7 +1728,7 @@ FILE* AppendBlockFile(unsigned int& nFileRet)
return NULL;
if (fseek(file, 0, SEEK_END) != 0)
return NULL;
- // FAT32 filesize max 4GB, fseek and ftell max 2GB, so we must stay under 2GB
+ // FAT32 file size max 4GB, fseek and ftell max 2GB, so we must stay under 2GB
if (ftell(file) < 0x7F000000 - MAX_SIZE)
{
nFileRet = nCurrentBlockFile;
@@ -1822,7 +1822,7 @@ bool LoadBlockIndex(bool fAllowNew)
void PrintBlockTree()
{
- // precompute tree structure
+ // pre-compute tree structure
map<CBlockIndex*, vector<CBlockIndex*> > mapNext;
for (map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
{
@@ -1875,7 +1875,7 @@ void PrintBlockTree()
PrintWallets(block);
- // put the main timechain first
+ // put the main time-chain first
vector<CBlockIndex*>& vNext = mapNext[pindex];
for (unsigned int i = 0; i < vNext.size(); i++)
{
@@ -2039,7 +2039,7 @@ bool static AlreadyHave(CTxDB& txdb, const CInv& inv)
// 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.
unsigned char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 };
@@ -2697,12 +2697,12 @@ bool ProcessMessages(CNode* pfrom)
{
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());
}
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());
}
else
@@ -2972,9 +2972,9 @@ unsigned int static ScanHash_CryptoPP(char* pmidstate, char* pdata, char* phash1
unsigned int& nNonce = *(unsigned int*)(pdata + 12);
for (;;)
{
- // Crypto++ SHA-256
+ // Crypto++ SHA256
// 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++;
SHA256Transform(phash1, pdata, pmidstate);
SHA256Transform(phash, phash1, pSHA256InitState);
@@ -3199,7 +3199,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1)
{
//
- // Prebuild hash buffers
+ // Pre-build hash buffers
//
struct
{
@@ -3320,7 +3320,7 @@ void static BitcoinMiner(CWallet *pwallet)
//
- // Prebuild hash buffers
+ // Pre-build hash buffers
//
char pmidstatebuf[32+16]; char* pmidstate = alignup<16>(pmidstatebuf);
char pdatabuf[128+16]; char* pdata = alignup<16>(pdatabuf);
@@ -3345,7 +3345,7 @@ void static BitcoinMiner(CWallet *pwallet)
unsigned int nHashesDone = 0;
unsigned int nNonceFound;
- // Crypto++ SHA-256
+ // Crypto++ SHA256
nNonceFound = ScanHash_CryptoPP(pmidstate, pdata + 64, phash1,
(char*)&hash, nHashesDone);