Skip to content

Commit

Permalink
3.5.9.6b - Mandatory - Prerelease
Browse files Browse the repository at this point in the history
- Neural Network enhancement to help stake current superblock
  • Loading branch information
gridcoin committed Jul 24, 2017
2 parents 22eebbe + b8e38ea commit 3555ba5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion contrib/Installer/boinc/boinc/clsBoincProjectDownload.vb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Public Class clsBoincProjectDownload
Public Function RetrieveCacheProjectFilename(sGzipUrl As String) As String
Dim sOut As String = Replace(sGzipUrl, "/", "[fslash]")
sOut = Replace(sOut, ":", "[colon]")
Dim sDayOfYear = Trim(Now.DayOfYear)
Dim sDayOfYear = Trim(DateTime.UtcNow.DayOfYear)
sOut = Replace(sOut, ".gz", sDayOfYear + "[!]gz")
sOut = Replace(sOut, ".", "[period]")
sOut = Replace(sOut, "[!]", ".")
Expand Down
12 changes: 5 additions & 7 deletions src/rpcblockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ extern Array GetUpgradedBeaconReport();
extern Array MagnitudeReport(std::string cpid);
std::string ConvertBinToHex(std::string a);
std::string ConvertHexToBin(std::string a);
extern std::vector<uint8_t> readFileToVector(std::string filename);

extern std::vector<unsigned char> readFileToVector(std::string filename);
bool TallyResearchAverages(bool Forcefully);
int RestartClient();
extern std::string SignBlockWithCPID(std::string sCPID, std::string sBlockHash);
Expand Down Expand Up @@ -248,18 +247,17 @@ std::string FileManifest()
return sMyManifest;
}


std::vector<uint8_t> readFileToVector(std::string filename)
std::vector<unsigned char> readFileToVector(std::string filename)
{
std::ifstream file(filename.c_str(), std::ios::binary);
file.unsetf(std::ios::skipws);
std::streampos fileSize;
file.seekg(0, std::ios::end);
fileSize = file.tellg();
file.seekg(0, std::ios::beg);
std::vector<uint8_t> vec;
std::vector<unsigned char> vec;
vec.reserve(fileSize);
vec.insert(vec.begin(), std::istream_iterator<uint8_t>(file), std::istream_iterator<uint8_t>());
vec.insert(vec.begin(), std::istream_iterator<unsigned char>(file), std::istream_iterator<unsigned char>());
return vec;
}

Expand Down Expand Up @@ -5217,7 +5215,7 @@ Value listitem(const Array& params, bool fHelp)
{
// This is a unit test to prove viability of transmitting a file from node to node
std::string sFile = "C:\\test.txt";
std::vector<uint8_t> v = readFileToVector(sFile);
std::vector<unsigned char> v = readFileToVector(sFile);
Object entry;
entry.push_back(Pair("byte1",v[1]));
entry.push_back(Pair("bytes",(double)v.size()));
Expand Down

2 comments on commit 3555ba5

@TheCharlatan
Copy link
Contributor

@TheCharlatan TheCharlatan commented on 3555ba5 Jul 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Rob, could you add a clearer commit message? This is a small, clean change, so it might be useful to add the direct description.

@tomasbrod
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rob never leaves descriptive commit messages. He likes to obfuscate things as much as allowed.

Please sign in to comment.