diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-02-18 10:01:01 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-02-18 10:01:01 +0200 |
commit | 43fe8c4933e1ff3542ae936841fabffe3aafc4dc (patch) | |
tree | d63324e4d5f192ce3a058541c8b5d5aaa18525f0 /src/blockchain_utilities | |
parent | Merge pull request #673 (diff) | |
parent | blockchain_import: Check bit width for more than just WIN32 (diff) | |
download | monero-43fe8c4933e1ff3542ae936841fabffe3aafc4dc.tar.xz |
Merge pull request #674
05e7ac0 blockchain_import: Check bit width for more than just WIN32 (warptangent)
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r-- | src/blockchain_utilities/CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/blockchain_utilities/blockchain_converter.cpp | 4 | ||||
-rw-r--r-- | src/blockchain_utilities/blockchain_import.cpp | 4 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/blockchain_utilities/CMakeLists.txt b/src/blockchain_utilities/CMakeLists.txt index ad2a5b40a..41c3098a0 100644 --- a/src/blockchain_utilities/CMakeLists.txt +++ b/src/blockchain_utilities/CMakeLists.txt @@ -99,6 +99,11 @@ target_link_libraries(blockchain_converter blockchain_db ${CMAKE_THREAD_LIBS_INIT}) +if(${ARCH_WIDTH} EQUAL 32) + target_compile_definitions(blockchain_converter + PUBLIC -DARCH_WIDTH=32) +endif() + add_dependencies(blockchain_converter version) set_property(TARGET blockchain_converter @@ -117,6 +122,11 @@ target_link_libraries(blockchain_import p2p ${CMAKE_THREAD_LIBS_INIT}) +if(${ARCH_WIDTH} EQUAL 32) + target_compile_definitions(blockchain_import + PUBLIC -DARCH_WIDTH=32) +endif() + add_dependencies(blockchain_import version) set_property(TARGET blockchain_import diff --git a/src/blockchain_utilities/blockchain_converter.cpp b/src/blockchain_utilities/blockchain_converter.cpp index fdd369e79..17b6d81bf 100644 --- a/src/blockchain_utilities/blockchain_converter.cpp +++ b/src/blockchain_utilities/blockchain_converter.cpp @@ -57,12 +57,12 @@ bool opt_testnet = false; // number of blocks per batch transaction // adjustable through command-line argument according to available RAM -#if !defined(WIN32) +#if ARCH_WIDTH != 32 uint64_t db_batch_size_verify = 5000; #else // set a lower default batch size for Windows, pending possible LMDB issue with // large batch size. -uint64_t db_batch_size_verify = 1000; +uint64_t db_batch_size_verify = 100; #endif // converter only uses verify mode diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index daa5db2a3..67ad24031 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -56,11 +56,11 @@ bool opt_testnet = true; // number of blocks per batch transaction // adjustable through command-line argument according to available RAM -#if !defined(WIN32) +#if ARCH_WIDTH != 32 uint64_t db_batch_size = 20000; #else // set a lower default batch size, pending possible LMDB issue with large transaction size -uint64_t db_batch_size = 1000; +uint64_t db_batch_size = 100; #endif // when verifying, use a smaller default batch size so progress is more |