data structures for pos log

This commit is contained in:
Marc Burns 2011-11-05 03:18:32 -04:00
parent a82f817071
commit 79dfa099a0
1 changed files with 39 additions and 0 deletions

39
database/log.cpp Normal file
View File

@ -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 {
};