mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-16 16:12:14 +11:00
🔥 removed legacy code
This commit is contained in:
parent
3bb7640cd6
commit
dc9b2e70c2
3 changed files with 1 additions and 23 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <json/json.h> // to be removed later
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include "ccash_config.hpp"
|
#include "ccash_config.hpp"
|
||||||
#include "change_flag.h"
|
#include "change_flag.h"
|
||||||
|
|
@ -19,5 +18,4 @@ public:
|
||||||
|
|
||||||
std::string GetLogs() noexcept;
|
std::string GetLogs() noexcept;
|
||||||
void AddTrans(const std::string &from, const std::string &to, uint32_t amount, time_t time) noexcept;
|
void AddTrans(const std::string &from, const std::string &to, uint32_t amount, time_t time) noexcept;
|
||||||
Json::Value Serialize() const; // to be removed later
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <json/json.h> //to be removed later
|
|
||||||
#include "xxhash_str.h"
|
#include "xxhash_str.h"
|
||||||
#include "bank_dom_final_models.h"
|
#include "bank_dom_final_models.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
@ -19,6 +18,4 @@ struct User
|
||||||
#endif
|
#endif
|
||||||
User(const bank_dom::User &u) noexcept;
|
User(const bank_dom::User &u) noexcept;
|
||||||
bank_dom::User Encode() const noexcept;
|
bank_dom::User Encode() const noexcept;
|
||||||
|
|
||||||
Json::Value Serialize() const; //to be removed later
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
17
src/log.cpp
17
src/log.cpp
|
|
@ -39,20 +39,3 @@ std::string Log::GetLogs() noexcept
|
||||||
}
|
}
|
||||||
return log_snapshot;
|
return log_snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
Json::Value Log::Serialize() const
|
|
||||||
{
|
|
||||||
Json::Value res;
|
|
||||||
for (uint32_t i = 0; i < data.size(); ++i)
|
|
||||||
{
|
|
||||||
res[i]["to"] = data[i].to;
|
|
||||||
res[i]["from"] = data[i].from;
|
|
||||||
res[i]["amount"] = (Json::UInt)data[i].amount;
|
|
||||||
#ifdef _USE_32BIT_TIME_T
|
|
||||||
res[i]["time"] = (Json::Int)data[i].time;
|
|
||||||
#else
|
|
||||||
res[i]["time"] = (Json::Int64)data[i].time;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue