aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/blockchain_db.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockchain_db/blockchain_db.h')
-rw-r--r--src/blockchain_db/blockchain_db.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h
index 27e63801d..ad246d85e 100644
--- a/src/blockchain_db/blockchain_db.h
+++ b/src/blockchain_db/blockchain_db.h
@@ -145,6 +145,12 @@ struct txpool_tx_meta_t
uint8_t padding[77]; // till 192 bytes
};
+#define DBF_SAFE 1
+#define DBF_FAST 2
+#define DBF_FASTEST 4
+#define DBF_RDONLY 8
+#define DBF_SALVAGE 0x10
+
/***********************************
* Exception Definitions
***********************************/
@@ -600,6 +606,13 @@ public:
virtual void sync() = 0;
/**
+ * @brief toggle safe syncs for the DB
+ *
+ * Used to switch DBF_SAFE on or off after starting up with DBF_FAST.
+ */
+ virtual void safesyncmode(const bool onoff) = 0;
+
+ /**
* @brief Remove everything from the BlockchainDB
*
* This function should completely remove all data from a BlockchainDB.
@@ -1491,6 +1504,7 @@ public:
}; // class BlockchainDB
+BlockchainDB *new_db(const std::string& db_type);
} // namespace cryptonote