mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 20:47:10 +11:00
request
This commit is contained in:
parent
a652fded48
commit
6a79ca9c39
2 changed files with 14 additions and 21 deletions
21
config.json
21
config.json
|
|
@ -1,16 +1,9 @@
|
||||||
{
|
{
|
||||||
"listeners": [
|
"listeners": [
|
||||||
{
|
{
|
||||||
"address": "0.0.0.0",
|
"address": "127.0.0.1",
|
||||||
"port": 80,
|
"port": 80,
|
||||||
"https": false
|
"https": false
|
||||||
},
|
}
|
||||||
{
|
]
|
||||||
"address": "0.0.0.0",
|
|
||||||
"port": 443,
|
|
||||||
"https": true,
|
|
||||||
"cert": "",
|
|
||||||
"key": ""
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,17 +36,17 @@ struct User
|
||||||
{
|
{
|
||||||
if (log_j.size())
|
if (log_j.size())
|
||||||
{
|
{
|
||||||
log.data.reserve(
|
unsigned size = ((log_j.size() / pre_log_size) + 1) * pre_log_size; // Ensures that we have a log size aligned on a multiple of `pre_log_size`
|
||||||
std::min(((log_j.size() / pre_log_size) + 1) * pre_log_size, max_log_size)
|
log.data.reserve(size); // Ensures that the log size is under `max_log_size`
|
||||||
); // Ensures that the log size is under `max_log_size` and is aligned on multiple of `pre_log_size`
|
size = std::min(log_j.size(), max_log_size);
|
||||||
for (uint32_t i = 0; i < std::min(log_j.size(), max_log_size); i++) //Matches the logs
|
log.data.resize(size);
|
||||||
|
for (uint32_t i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
log.data.push_back(std::move(Transaction(
|
log.data[i] = std::move(Transaction(
|
||||||
log_j[i]["from"].asCString(),
|
log_j[i]["from"].asCString(),
|
||||||
log_j[i]["to"].asCString(),
|
log_j[i]["to"].asCString(),
|
||||||
log_j[i]["amount"].asUInt(),
|
log_j[i]["amount"].asUInt(),
|
||||||
log_j[i]["time"].asUInt64()
|
log_j[i]["time"].asUInt64()));
|
||||||
)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue