Changeset View
Changeset View
Standalone View
Standalone View
src/test/flatfile_tests.cpp
Show All 32 Lines | std::string line1( | ||||
"A purely peer-to-peer version of electronic cash would allow online " | "A purely peer-to-peer version of electronic cash would allow online " | ||||
"payments to be sent directly from one party to another without going " | "payments to be sent directly from one party to another without going " | ||||
"through a financial institution."); | "through a financial institution."); | ||||
std::string line2("Digital signatures provide part of the solution, but " | std::string line2("Digital signatures provide part of the solution, but " | ||||
"the main benefits are lost if a trusted third party is " | "the main benefits are lost if a trusted third party is " | ||||
"still required to prevent double-spending."); | "still required to prevent double-spending."); | ||||
size_t pos1 = 0; | size_t pos1 = 0; | ||||
size_t pos2 = pos1 + GetSerializeSize(line1, 0, CLIENT_VERSION); | size_t pos2 = pos1 + GetSerializeSize(line1, CLIENT_VERSION); | ||||
// Write first line to file. | // Write first line to file. | ||||
{ | { | ||||
CAutoFile file(seq.Open(FlatFilePos(0, pos1)), SER_DISK, | CAutoFile file(seq.Open(FlatFilePos(0, pos1)), SER_DISK, | ||||
CLIENT_VERSION); | CLIENT_VERSION); | ||||
file << LIMITED_STRING(line1, 256); | file << LIMITED_STRING(line1, 256); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |