result.push_back(Pair("synccheckpoint", Checkpoints::hashSyncCheckpoint.ToString().c_str()));
pindexCheckpoint = mapBlockIndex[Checkpoints::hashSyncCheckpoint];
result.push_back(Pair("height", pindexCheckpoint->nHeight));
- result.push_back(Pair("timestamp", DateTimeStrFormat("%x %H:%M:%S", pindexCheckpoint->GetBlockTime()).c_str()));
+ result.push_back(Pair("timestamp", DateTimeStrFormat(pindexCheckpoint->GetBlockTime()).c_str()));
return result;
}
// Constant stuff for coinbase transactions we create:
CScript COINBASE_FLAGS;
-const string strMessageMagic = "Bitcoin Signed Message:\n";
+const string strMessageMagic = "PPCoin Signed Message:\n";
double dHashesPerSec;
int64 nHPSTimerStart;
string strMessage = _("Warning: Disk space is low");
strMiscWarning = strMessage;
printf("*** %s\n", strMessage.c_str());
- ThreadSafeMessageBox(strMessage, "Bitcoin", wxOK | wxICON_EXCLAMATION | wxMODAL);
+ ThreadSafeMessageBox(strMessage, "PPCoin", wxOK | wxICON_EXCLAMATION | wxMODAL);
StartShutdown();
return false;
}
pindex->nBlockPos,
block.GetHash().ToString().substr(0,20).c_str(),
block.nBits,
- DateTimeStrFormat("%x %H:%M:%S", block.GetBlockTime()).c_str(),
+ DateTimeStrFormat(block.GetBlockTime()).c_str(),
block.vtx.size());
PrintWallets(block);
static map<CService, vector<unsigned char> > mapReuseKey;
RandAddSeedPerfmon();
if (fDebug) {
- printf("%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
+ printf("%s ", DateTimeStrFormat(GetTime()).c_str());
printf("received: %s (%d bytes)\n", strCommand.c_str(), vRecv.size());
}
if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0)
printf("BitcoinMiner:\n");
printf("new block found \n hash: %s \ntarget: %s\n", hash.GetHex().c_str(), hashTarget.GetHex().c_str());
pblock->print();
- printf("%s ", DateTimeStrFormat("%x %H:%M", GetTime()).c_str());
+ printf("%s ", DateTimeStrFormat(GetTime()).c_str());
printf("generated %s\n", FormatMoney(pblock->vtx[0].vout[0].nValue).c_str());
// Found a solution
if (GetTime() - nLogTime > 30 * 60)
{
nLogTime = GetTime();
- printf("%s ", DateTimeStrFormat("%x %H:%M", GetTime()).c_str());
+ printf("%s ", DateTimeStrFormat(GetTime()).c_str());
printf("hashmeter %3d CPUs %6.0f khash/s\n", vnThreadsRunning[THREAD_MINER], dHashesPerSec/1000.0);
}
}
if (hSocket != INVALID_SOCKET)
{
if (fDebug)
- printf("%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
+ printf("%s ", DateTimeStrFormat(GetTime()).c_str());
printf("disconnecting node %s\n", addr.ToString().c_str());
closesocket(hSocket);
hSocket = INVALID_SOCKET;
}
}
- string strDesc = "Bitcoin " + FormatFullVersion();
+ string strDesc = "PPCoin " + FormatFullVersion();
#ifndef UPNPDISCOVER_SUCCESS
/* miniupnpc 1.5 */
r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
{
int nErr = WSAGetLastError();
if (nErr == WSAEADDRINUSE)
- strError = strprintf(_("Unable to bind to port %d on this computer. Bitcoin is probably already running."), ntohs(sockaddr.sin_port));
+ strError = strprintf(_("Unable to bind to port %d on this computer. PPCoin is probably already running."), ntohs(sockaddr.sin_port));
else
strError = strprintf("Error: Unable to bind to port %d on this computer (bind returned error %d)", ntohs(sockaddr.sin_port), nErr);
printf("%s\n", strError.c_str());
vSend << CMessageHeader(pszCommand, 0);
nMessageStart = vSend.size();
if (fDebug) {
- printf("%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
+ printf("%s ", DateTimeStrFormat(GetTime()).c_str());
printf("sending: %s ", pszCommand);
}
}
// Copyright (c) 2009-2012 Bitcoin Developers
+// Copyright (c) 2012 The PPCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
- "importprivkey <bitcoinprivkey> [label]\n"
+ "importprivkey <ppcoinprivkey> [label]\n"
"Adds a private key (as returned by dumpprivkey) to your wallet.");
string strSecret = params[0].get_str();
{
if (fHelp || params.size() != 1)
throw runtime_error(
- "dumpprivkey <bitcoinaddress>\n"
- "Reveals the private key corresponding to <bitcoinaddress>.");
+ "dumpprivkey <ppcoinaddress>\n"
+ "Reveals the private key corresponding to <ppcoinaddress>.");
string strAddress = params[0].get_str();
CBitcoinAddress address;
if (!address.SetString(strAddress))
- throw JSONRPCError(-5, "Invalid bitcoin address");
+ throw JSONRPCError(-5, "Invalid ppcoin address");
CSecret vchSecret;
bool fCompressed;
if (!pwalletMain->GetSecret(address, vchSecret, fCompressed))
{
RAND_add(pdata, nSize, nSize/100.0);
memset(pdata, 0, nSize);
- printf("%s RandAddSeed() %d bytes\n", DateTimeStrFormat("%x %H:%M", GetTime()).c_str(), nSize);
+ printf("%s RandAddSeed() %d bytes\n", DateTimeStrFormat(GetTime()).c_str(), nSize);
}
#endif
}
// Debug print useful for profiling
if (fLogTimestamps && fStartedNewLine)
- fprintf(fileout, "%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
+ fprintf(fileout, "%s ", DateTimeStrFormat(GetTime()).c_str());
if (pszFormat[strlen(pszFormat) - 1] == '\n')
fStartedNewLine = true;
else
pszModule[0] = '\0';
GetModuleFileNameA(NULL, pszModule, sizeof(pszModule));
#else
- const char* pszModule = "bitcoin";
+ const char* pszModule = "ppcoin";
#endif
if (pex)
snprintf(pszMessage, 1000,
if (!fMatch)
{
fDone = true;
- string strMessage = _("Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly.");
+ string strMessage = _("Warning: Please check that your computer's date and time are correct. If your clock is wrong PPCoin will not work properly.");
strMiscWarning = strMessage;
printf("*** %s\n", strMessage.c_str());
- ThreadSafeMessageBox(strMessage+" ", string("Bitcoin"), wxOK | wxICON_EXCLAMATION);
+ ThreadSafeMessageBox(strMessage+" ", string("PPCoin"), wxOK | wxICON_EXCLAMATION);
}
}
}
#ifdef WIN32
boost::filesystem::path static StartupShortcutPath()
{
- return MyGetSpecialFolderPath(CSIDL_STARTUP, true) / "Bitcoin.lnk";
+ return MyGetSpecialFolderPath(CSIDL_STARTUP, true) / "PPCoin.lnk";
}
bool GetStartOnSystemStartup()
boost::filesystem::path static GetAutostartFilePath()
{
- return GetAutostartDir() / "bitcoin.desktop";
+ return GetAutostartDir() / "ppcoin.desktop";
}
bool GetStartOnSystemStartup()
if (line.find("Hidden") != string::npos &&
line.find("true") != string::npos)
return false;
->>>>>>> bitcoin
}
optionFile.close();
// Write a bitcoin.desktop file to the autostart directory:
optionFile << "[Desktop Entry]\n";
optionFile << "Type=Application\n";
- optionFile << "Name=Bitcoin\n";
+ optionFile << "Name=PPCoin\n";
optionFile << "Exec=" << pszExePath << " -min\n";
optionFile << "Terminal=false\n";
optionFile << "Hidden=false\n";
return pszTime;
}
+static const std::string strTimestampFormat = "%F %H:%M:%S";
+inline std::string DateTimeStrFormat(int64 nTime)
+{
+ return DateTimeStrFormat(strTimestampFormat.c_str(), nTime);
+}
+
template<typename T>
void skipspaces(T& it)
{
}
//// debug print
- printf("SelectCoins() best subset: ");
- for (unsigned int i = 0; i < vValue.size(); i++)
- if (vfBest[i])
- printf("%s ", FormatMoney(vValue[i].first).c_str());
- printf("total %s\n", FormatMoney(nBest).c_str());
+ if (fDebug && GetBoolArg("-printselectcoin"))
+ {
+ printf("SelectCoins() best subset: ");
+ for (unsigned int i = 0; i < vValue.size(); i++)
+ if (vfBest[i])
+ printf("%s ", FormatMoney(vValue[i].first).c_str());
+ printf("total %s\n", FormatMoney(nBest).c_str());
+ }
}
return true;
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
+// Copyright (c) 2012 The PPCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
//printf("LoadWallet %s\n", wtx.GetHash().ToString().c_str());
//printf(" %12"PRI64d" %s %s %s\n",
// wtx.vout[0].nValue,
- // DateTimeStrFormat("%x %H:%M:%S", wtx.GetBlockTime()).c_str(),
+ // DateTimeStrFormat(wtx.GetBlockTime()).c_str(),
// wtx.hashBlock.ToString().substr(0,20).c_str(),
// wtx.mapValue["message"].c_str());
}
map<string, int>::iterator mi = mapFileUseCount.find(strFile);
if (mi != mapFileUseCount.end())
{
- printf("%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
+ printf("%s ", DateTimeStrFormat(GetTime()).c_str());
printf("Flushing wallet.dat\n");
nLastFlushed = nWalletDBUpdated;
int64 nStart = GetTimeMillis();