diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-07-26 10:17:57 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-07 14:32:49 +0100 |
commit | c93b7692b4362a7a76e4f0e65b0cee018d2b89ac (patch) | |
tree | ac9122f46094fc03b24ec8419f3b389f68ae8001 /src/blockchain_utilities/CMakeLists.txt | |
parent | core: new API to disable DNS checkpoint lookups (diff) | |
download | monero-c93b7692b4362a7a76e4f0e65b0cee018d2b89ac.tar.xz |
blockchain_import: much faster when verifying with cryptonote::core
Quick test with the first 56569 blocks from mainnet
version verify batch time
old 0 200 1:16
new 0 200 0:57
old 0 5000 0:53
new 0 5000 0:51
old 1 200 est > 1h
new 1 200 10:21
old 1 5000 est > 1h
new 1 5000 8:27
Diffstat (limited to 'src/blockchain_utilities/CMakeLists.txt')
-rw-r--r-- | src/blockchain_utilities/CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/blockchain_utilities/CMakeLists.txt b/src/blockchain_utilities/CMakeLists.txt index bb23cdc8b..628c037b3 100644 --- a/src/blockchain_utilities/CMakeLists.txt +++ b/src/blockchain_utilities/CMakeLists.txt @@ -26,6 +26,16 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +set(blocksdat "") +if(PER_BLOCK_CHECKPOINT) + if(APPLE) + add_custom_command(OUTPUT blocksdat.o MAIN_DEPENDENCY ../blocks/checkpoints.dat COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && touch stub.c && ${CMAKE_C_COMPILER} -o stub.o -c stub.c COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && ${CMAKE_LINKER} -r -sectcreate __DATA __blocks_dat ../blocks/checkpoints.dat -o ${CMAKE_CURRENT_BINARY_DIR}/blocksdat.o stub.o && rm -f stub.*) + else() + add_custom_command(OUTPUT blocksdat.o MAIN_DEPENDENCY ../blocks/checkpoints.dat COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && cp ../blocks/checkpoints.dat blocks.dat && ${CMAKE_LINKER} -r -b binary -o ${CMAKE_CURRENT_BINARY_DIR}/blocksdat.o blocks.dat && rm -f blocks.dat) + endif() + set(blocksdat "blocksdat.o") +endif() + set(blockchain_import_sources blockchain_import.cpp bootstrap_file.cpp @@ -33,7 +43,6 @@ set(blockchain_import_sources ) set(blockchain_import_private_headers - fake_core.h bootstrap_file.h blocksdat_file.h bootstrap_serialization.h @@ -65,7 +74,8 @@ set(cn_deserialize_sources monero_add_executable(blockchain_import ${blockchain_import_sources} - ${blockchain_import_private_headers}) + ${blockchain_import_private_headers} + ${blocksdat}) target_link_libraries(blockchain_import PRIVATE |