mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-23 13:04:17 +00:00
Refactor: move runCommand() to util.cpp
This commit is contained in:
parent
8956453c0d
commit
429039d45d
@ -1501,14 +1501,6 @@ bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
runCommand(std::string strCommand)
|
||||
{
|
||||
int nErr = ::system(strCommand.c_str());
|
||||
if (nErr)
|
||||
printf("runCommand error: system(%s) returned %d\n", strCommand.c_str(), nErr);
|
||||
}
|
||||
|
||||
// Called from inside SetBestChain: attaches a block to the new best chain being built
|
||||
bool CBlock::SetBestChainInner(CTxDB& txdb, CBlockIndex *pindexNew)
|
||||
{
|
||||
|
@ -1079,3 +1079,11 @@ boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate)
|
||||
return fs::path("");
|
||||
}
|
||||
#endif
|
||||
|
||||
void runCommand(std::string strCommand)
|
||||
{
|
||||
int nErr = ::system(strCommand.c_str());
|
||||
if (nErr)
|
||||
printf("runCommand error: system(%s) returned %d\n", strCommand.c_str(), nErr);
|
||||
}
|
||||
|
||||
|
@ -171,6 +171,7 @@ int64 GetAdjustedTime();
|
||||
std::string FormatFullVersion();
|
||||
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
|
||||
void AddTimeData(const CNetAddr& ip, int64 nTime);
|
||||
void runCommand(std::string strCommand);
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user