diff options
| author | Thomas Winget <tewinget@gmail.com> | 2015-02-03 04:47:33 -0500 |
|---|---|---|
| committer | Thomas Winget <tewinget@gmail.com> | 2015-02-03 05:18:12 -0500 |
| commit | d1f40506fabcc006c326df355c6d471ed739b783 (patch) | |
| tree | 70c9a0f292631feb8145aa97eff38f564087dc32 /src/cryptonote_core/cryptonote_core.cpp | |
| parent | a4f5344024d55986fb52cf58c1cbdbf694c51e3b (diff) | |
| parent | 84fe5fbd65100a731608471ef0a4c462ea8f5626 (diff) | |
| download | monzero-core-d1f40506fabcc006c326df355c6d471ed739b783.tar.gz monzero-core-d1f40506fabcc006c326df355c6d471ed739b783.tar.xz monzero-core-d1f40506fabcc006c326df355c6d471ed739b783.zip | |
Merge PR #26
Usage:
default is lmdb for blockchain branch:
$ make release
same as:
$ DATABASE=lmdb make release
for original in-memory implementation:
$ DATABASE=memory make release
COMMITS:
- Add compile-time support for both db implementations: in-memory and LMDB
NOTE:
The default should be changed to lmdb when this is merged upstream
unless we're 100% sure the LMDB implementation is ready.
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index e2c533fe5..3a6b84b74 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -51,7 +51,11 @@ namespace cryptonote //----------------------------------------------------------------------------------------------- core::core(i_cryptonote_protocol* pprotocol): m_mempool(m_blockchain_storage), +#if BLOCKCHAIN_DB == DB_LMDB m_blockchain_storage(m_mempool), +#else + m_blockchain_storage(&m_mempool), +#endif m_miner(this), m_miner_address(boost::value_initialized<account_public_address>()), m_starter_message_showed(false), @@ -577,7 +581,11 @@ namespace cryptonote m_starter_message_showed = true; } +#if BLOCKCHAIN_DB == DB_LMDB m_store_blockchain_interval.do_call(boost::bind(&Blockchain::store_blockchain, &m_blockchain_storage)); +#else + m_store_blockchain_interval.do_call(boost::bind(&blockchain_storage::store_blockchain, &m_blockchain_storage)); +#endif m_miner.on_idle(); m_mempool.on_idle(); return true; |
