blockchain_export can now export to a blocks.dat format

Also make the number of blocks endian independant, and add
support for testnet
This commit is contained in:
moneromooo-monero 2015-10-16 19:45:35 +01:00
parent 11db442a6c
commit b13e7f284b
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
11 changed files with 368 additions and 38 deletions

View file

@ -49,24 +49,7 @@
#include "common/command_line.h"
#include "version.h"
// CONFIG: choose one of the three #define's
//
// DB_MEMORY is a sensible default for users migrating to LMDB, as it allows
// the exporter to use the in-memory blockchain while the other binaries
// work with LMDB, without recompiling anything.
//
#define SOURCE_DB DB_MEMORY
// #define SOURCE_DB DB_LMDB
// to use global compile-time setting (DB_MEMORY or DB_LMDB):
// #define SOURCE_DB BLOCKCHAIN_DB
// bounds checking is done before writing to buffer, but buffer size
// should be a sensible maximum
#define BUFFER_SIZE 1000000
#define NUM_BLOCKS_PER_CHUNK 1
#define BLOCKCHAIN_RAW "blockchain.raw"
#include "blockchain_utilities.h"
using namespace cryptonote;