diff options
author | warptangent <warptangent@tutanota.com> | 2016-02-08 07:51:57 -0800 |
---|---|---|
committer | warptangent <warptangent@tutanota.com> | 2016-02-08 09:28:17 -0800 |
commit | 3800875406fecab5123564e58ddb698bce550441 (patch) | |
tree | e206b07ff8f3ae314467ceca40661ba221689b0a /src/blockchain_db/blockchain_db.h | |
parent | BlockchainDB/LMDB: Refactor block-scope DB txn handling for add block (diff) | |
download | monero-3800875406fecab5123564e58ddb698bce550441.tar.xz |
Make HardFork object available to BlockchainDB and derived DB implementations
This will later allow the HardFork object's DB update functions to be
called when the DB transaction that persists across block add/remove is
open.
Diffstat (limited to '')
-rw-r--r-- | src/blockchain_db/blockchain_db.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index 31d5e2644..5926f34a5 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -28,12 +28,15 @@ #ifndef BLOCKCHAIN_DB_H #define BLOCKCHAIN_DB_H +#pragma once + #include <list> #include <string> #include <exception> #include "crypto/hash.h" #include "cryptonote_core/cryptonote_basic.h" #include "cryptonote_core/difficulty.h" +#include "cryptonote_core/hardfork.h" /* DB Driver Interface * @@ -322,6 +325,8 @@ protected: uint64_t time_commit1 = 0; bool m_auto_remove_logs = true; + HardFork* m_hardfork; + public: // virtual dtor @@ -372,6 +377,8 @@ public: virtual void block_txn_stop() = 0; virtual void block_txn_abort() = 0; + virtual void set_hard_fork(HardFork*& hf); + // adds a block with the given metadata to the top of the blockchain, returns the new height // NOTE: subclass implementations of this (or the functions it calls) need // to handle undoing any partially-added blocks in the event of a failure. |