mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 12:37:08 +11:00
🐎 reduced time vars size
This commit is contained in:
parent
34ced37a71
commit
a3d93b5831
3 changed files with 5 additions and 5 deletions
|
|
@ -214,7 +214,7 @@ public:
|
|||
uint32_t j;
|
||||
for (uint32_t i = l.data.size() - 1; i > 0; --i)
|
||||
{
|
||||
j = 99 - i;
|
||||
j = 24 - i;
|
||||
if (!l.data[i].amount)
|
||||
{
|
||||
return;
|
||||
|
|
@ -222,7 +222,7 @@ public:
|
|||
res[j]["to"] = l.data[i].to;
|
||||
res[j]["from"] = l.data[i].from;
|
||||
res[j]["amount"] = l.data[i].amount;
|
||||
res[j]["time"] = (Json::UInt64)l.data[i].time;
|
||||
res[j]["time"] = (Json::UInt)l.data[i].time;
|
||||
}
|
||||
})))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
struct Log
|
||||
{
|
||||
std::array<Transaction, 100> data;
|
||||
std::array<Transaction, 25> data;
|
||||
void AddTrans(Transaction &&v)
|
||||
{
|
||||
std::rotate(data.begin(), data.begin() + 1, data.end());
|
||||
data[99] = std::move(v);
|
||||
data[24] = std::move(v);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ struct Transaction
|
|||
|
||||
std::string from = "", to = "";
|
||||
uint32_t amount = 0;
|
||||
uint64_t time = 0;
|
||||
uint32_t time = 0;
|
||||
|
||||
void Concatinate(std::string &s)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue