Bugfix: Fix a variety of misspellings

(PARTIAL: Left out anything changing debug.log)
This commit is contained in:
Luke Dashjr
2012-07-26 00:48:39 +00:00
parent ae8ccfd24b
commit 9e98fe6f58
11 changed files with 33 additions and 33 deletions

View File

@@ -22,8 +22,8 @@ bool Function(char* psz, int n)
- No extra spaces inside parenthesis; please don't do ( this )
- No space after function names, one space after if, for and while
Variable names begin with the type in lowercase, like nSomeVariable.
Please don't put the first word of the variable name in lowercase like
Variable names begin with the type in lower-case, like nSomeVariable.
Please don't put the first word of the variable name in lower-case like
someVariable.
Common types:

View File

@@ -10,7 +10,7 @@
// could be used to create visually identical looking account numbers.
// - A string with non-alphanumeric characters is not as easily accepted as an account number.
// - E-mail usually won't line-break if there's no punctuation to break at.
// - Doubleclicking selects the whole number as one word if it's all alphanumeric.
// - Double-clicking selects the whole number as one word if it's all alphanumeric.
//
#ifndef BITCOIN_BASE58_H
#define BITCOIN_BASE58_H

View File

@@ -20,7 +20,7 @@ bool CCrypter::SetKeyFromPassphrase(const std::string& strKeyData, const std::ve
if (nRounds < 1 || chSalt.size() != WALLET_CRYPTO_SALT_SIZE)
return false;
// Try to keep the keydata out of swap (and be a bit over-careful to keep the IV that we don't even use out of swap)
// Try to keep the key data out of swap (and be a bit over-careful to keep the IV that we don't even use out of swap)
// Note that this does nothing about suspend-to-disk (which will put all our key data on disk)
// Note as well that at no point in this program is any attempt made to prevent stealing of keys by reading the memory of the running process.
mlock(&chKey[0], sizeof chKey);
@@ -47,7 +47,7 @@ bool CCrypter::SetKey(const CKeyingMaterial& chNewKey, const std::vector<unsigne
if (chNewKey.size() != WALLET_CRYPTO_KEY_SIZE || chNewIV.size() != WALLET_CRYPTO_KEY_SIZE)
return false;
// Try to keep the keydata out of swap
// Try to keep the key data out of swap
// Note that this does nothing about suspend-to-disk (which will put all our key data on disk)
// Note as well that at no point in this program is any attempt made to prevent stealing of keys by reading the memory of the running process.
mlock(&chKey[0], sizeof chKey);

View File

@@ -113,12 +113,12 @@ bool AppInit(int argc, char* argv[])
bool AppInit2(int argc, char* argv[])
{
#ifdef _MSC_VER
// Turn off microsoft heap dump noise
// Turn off Microsoft heap dump noise
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_WARN, CreateFileA("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0));
#endif
#if _MSC_VER >= 1400
// Disable confusing "helpful" text message on abort, ctrl-c
// Disable confusing "helpful" text message on abort, Ctrl-C
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
#endif
#ifndef __WXMSW__

View File

@@ -254,7 +254,7 @@ void ThreadIRCSeed(void* parg)
void ThreadIRCSeed2(void* parg)
{
/* Dont advertise on IRC if we don't allow incoming connections */
/* Don't advertise on IRC if we don't allow incoming connections */
if (mapArgs.count("-connect") || fNoListen)
return;

View File

@@ -881,7 +881,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;
@@ -1516,7 +1516,7 @@ bool CBlock::CheckBlock() const
if (GetSigOpCount() > MAX_BLOCK_SIGOPS)
return error("CheckBlock() : out-of-bounds SigOpCount");
// Check merkleroot
// Check merkle root
if (hashMerkleRoot != BuildMerkleTree())
return error("CheckBlock() : hashMerkleRoot mismatch");
@@ -1704,7 +1704,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;
@@ -1798,7 +1798,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)
{
@@ -1851,7 +1851,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++)
{
@@ -2015,7 +2015,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 };
@@ -2656,12 +2656,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
@@ -2921,9 +2921,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);
@@ -3148,7 +3148,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
{
@@ -3270,7 +3270,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);
@@ -3295,7 +3295,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);

View File

@@ -357,7 +357,7 @@ bool GetMyExternalIP(unsigned int& ipRet)
{
// We should be phasing out our use of sites like these. If we need
// replacements, we should ask for volunteers to put this simple
// php file on their webserver that prints the client IP:
// php file on their web server that prints the client IP:
// <?php echo $_SERVER["REMOTE_ADDR"]; ?>
if (nHost == 1)
{
@@ -680,7 +680,7 @@ CNode* ConnectNode(CAddress addrConnect, int64 nTimeout)
/// debug print
printf("connected %s\n", addrConnect.ToString().c_str());
// Set to nonblocking
// Set to non-blocking
#ifdef __WXMSW__
u_long nOne = 1;
if (ioctlsocket(hSocket, FIONBIO, &nOne) == SOCKET_ERROR)
@@ -1704,7 +1704,7 @@ bool BindListenPort(string& strError)
#endif
#ifdef __WXMSW__
// Set to nonblocking, incoming connections will also inherit this
// Set to non-blocking, incoming connections will also inherit this
if (ioctlsocket(hListenSocket, FIONBIO, (u_long*)&nOne) == SOCKET_ERROR)
#else
if (fcntl(hListenSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR)
@@ -1751,7 +1751,7 @@ void StartNode(void* parg)
pnodeLocalHost = new CNode(INVALID_SOCKET, CAddress("127.0.0.1", 0, false, nLocalServices));
#ifdef __WXMSW__
// Get local host ip
// Get local host IP
char pszHostName[1000] = "";
if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR)
{
@@ -1765,7 +1765,7 @@ void StartNode(void* parg)
}
}
#else
// Get local host ip
// Get local host IP
struct ifaddrs* myaddrs;
if (getifaddrs(&myaddrs) == 0)
{

View File

@@ -215,7 +215,7 @@ bool CAddress::IsRoutable() const
bool CAddress::IsValid() const
{
// Clean up 3-byte shifted addresses caused by garbage in size field
// Cleanup 3-byte shifted addresses caused by garbage in size field
// of addr messages from versions before 0.2.9 checksum.
// Two consecutive addr messages look like this:
// header20 vectorlen3 addr26 addr26 addr26 header20 vectorlen3 addr26 addr26 addr26...

View File

@@ -1580,7 +1580,7 @@ Value getwork(const Array& params, bool fHelp)
// Save
mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig);
// Prebuild hash buffers
// Pre-build hash buffers
char pmidstate[32];
char pdata[128];
char phash1[64];
@@ -1744,7 +1744,7 @@ string rfc1123Time()
time(&now);
struct tm* now_gmt = gmtime(&now);
string locale(setlocale(LC_TIME, NULL));
setlocale(LC_TIME, "C"); // we want posix (aka "C") weekday/month strings
setlocale(LC_TIME, "C"); // we want POSIX (aka "C") weekday/month strings
strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S +0000", now_gmt);
setlocale(LC_TIME, locale.c_str());
return string(buffer);
@@ -2421,7 +2421,7 @@ int CommandLineRPC(int argc, char *argv[])
int main(int argc, char *argv[])
{
#ifdef _MSC_VER
// Turn off microsoft heap dump noise
// Turn off Microsoft heap dump noise
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_WARN, CreateFile("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0));
#endif

View File

@@ -904,7 +904,7 @@ uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int
}
else if ((nHashType & 0x1f) == SIGHASH_SINGLE)
{
// Only lockin the txout payee at same index as txin
// Only lock-in the txout payee at same index as txin
unsigned int nOut = nIn;
if (nOut >= txTmp.vout.size())
{

View File

@@ -628,7 +628,7 @@ void CWallet::ReacceptWalletTransactions()
}
else
{
// Reaccept any txes of ours that aren't already in a block
// Re-accept any txes of ours that aren't already in a block
if (!wtx.IsCoinBase())
wtx.AcceptWalletTransaction(txdb, false);
}
@@ -637,7 +637,7 @@ void CWallet::ReacceptWalletTransactions()
{
// TODO: optimize this to scan just part of the block chain?
if (ScanForWalletTransactions(pindexGenesisBlock))
fRepeat = true; // Found missing transactions: re-do Reaccept.
fRepeat = true; // Found missing transactions: re-do re-accept.
}
}
}