data structures for pos log
This commit is contained in:
parent
a82f817071
commit
79dfa099a0
|
@ -0,0 +1,39 @@
|
|||
#include <iostream>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <cstdlib>
|
||||
#include <cstdint>
|
||||
|
||||
#include <boost
|
||||
|
||||
enum E_OBJ_TYPE { ET_TRANS, ET_HASH, ET_SALE };
|
||||
|
||||
struct LogEntry {
|
||||
uint64_t ts;
|
||||
short type;
|
||||
bool revert;
|
||||
};
|
||||
|
||||
struct Transaction : LogEntry {
|
||||
Transaction() : type(ET_TRANS) {};
|
||||
char hash[16];
|
||||
int32_t delta;
|
||||
};
|
||||
|
||||
struct HashChange : LogEntry {
|
||||
HashChange() : type(ET_HASH) {};
|
||||
char hash[16];
|
||||
bool add;
|
||||
};
|
||||
|
||||
struct Sale : LogEntry {
|
||||
Sale() :
|
||||
char hash[16];
|
||||
uint64_t upc[2];
|
||||
};
|
||||
|
||||
struct LogFile {
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue