mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-16 00:02:14 +11:00
25 lines
510 B
C++
25 lines
510 B
C++
#pragma once
|
|
#include <json/json.h> // to be removed later
|
|
#include <vector>
|
|
#include <algorithm>
|
|
#include "ccash_config.hpp"
|
|
#include "change_flag.h"
|
|
#include "transaction.h"
|
|
|
|
struct Log
|
|
{
|
|
private:
|
|
ChangeFlag<true> log_flag;
|
|
std::string log_snapshot;
|
|
|
|
public:
|
|
#if MAX_LOG_SIZE == 1
|
|
Transaction data;
|
|
#else
|
|
std::vector<Transaction> data;
|
|
#endif
|
|
|
|
const std::string &GetLog() noexcept;
|
|
void AddTrans(Transaction &&t) noexcept;
|
|
Json::Value Serialize() const; // to be removed later
|
|
};
|