Updating cid codes

This commit is contained in:
jmjatlanta 2017-09-04 13:33:56 -05:00
parent 7dbb6fca29
commit bf87d93136
12 changed files with 82 additions and 49 deletions

View file

@ -10,12 +10,17 @@
#include "libp2p/db/datastore.h"
struct JournalRecord {
unsigned long long timestamp;
int pin;
uint8_t *hash;
size_t hash_size;
unsigned long long timestamp; // the timestamp of the file
int pin; // true if it is to be stored, false if it is to be deleted
int pending; // true if we do not have this file yet
uint8_t *hash; // the hash of the block (file)
size_t hash_size; // the size of the hash
};
struct JournalRecord* lmdb_journal_record_new();
int lmdb_journal_record_free(struct JournalRecord* rec);
/**
* Open a cursor to the journalstore table
*/
@ -33,4 +38,4 @@ int repo_journalstore_cursor_close(struct Datastore* datastore, void* cursor);
int journal_record_free(struct JournalRecord* rec);
int lmdb_journalstore_journal_add(MDB_txn* mdb_txn, unsigned long long timestamp, const uint8_t *hash, size_t hash_size);
int lmdb_journalstore_journal_add(MDB_txn* mdb_txn, struct JournalRecord* record);