diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-06-01 20:31:55 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-06-01 20:31:55 +0200 |
commit | 3f2c82326efaa60a836be293b96793d9290a57e7 (patch) | |
tree | 5c4987118f58bd98f454f7439d70af66cf44acf5 /src/blockchain_db/blockchain_db.h | |
parent | Merge pull request #5551 (diff) | |
parent | blockchain: do not try to pop blocks down to the genesis block (diff) | |
download | monero-3f2c82326efaa60a836be293b96793d9290a57e7.tar.xz |
Merge pull request #5572
a663ccba blockchain: do not try to pop blocks down to the genesis block (moneromooo-monero)
8f2a99d8 core: do not commit half constructed batch db txn (moneromooo-monero)
Diffstat (limited to 'src/blockchain_db/blockchain_db.h')
-rw-r--r-- | src/blockchain_db/blockchain_db.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index 567be6a65..b6b8c6c3e 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -754,6 +754,21 @@ public: virtual void batch_stop() = 0; /** + * @brief aborts a batch transaction + * + * If the subclass implements batching, this function should abort the + * batch it is currently on. + * + * If no batch is in-progress, this function should throw a DB_ERROR. + * This exception may change in the future if it is deemed necessary to + * have a more granular exception type for this scenario. + * + * If any of this cannot be done, the subclass should throw the corresponding + * subclass of DB_EXCEPTION + */ + virtual void batch_abort() = 0; + + /** * @brief sets whether or not to batch transactions * * If the subclass implements batching, this function tells it to begin |