diff options
author | warptangent <warptangent@inbox.com> | 2015-08-04 14:59:42 -0700 |
---|---|---|
committer | warptangent <warptangent@inbox.com> | 2015-08-04 17:11:30 -0700 |
commit | 525bf5811fe46b4446a496ee3bcffb916029a5ef (patch) | |
tree | 2065db0aae7d82a498e5654ebc60b6f12ef080b9 /.gitignore | |
parent | Merge pull request #358 (diff) | |
download | monero-525bf5811fe46b4446a496ee3bcffb916029a5ef.tar.xz |
Fix estimation of batch storage size when no blocks exist
If there's no blocks in database (m_height == 0):
Don't assign incorrect block range to check.
Skip average block size check.
Test:
Run blockchain_converter with an existing source blockchain.bin and
a non-existent LMDB destination database.
The converter creates a BlockchainLMDB instance with zero height, due to
not being initialized with a genesis block, normally done by
Blockchain::init(). While different than the behavior of bitmonerod,
blockchain_import, and blockchain_export, the initialization hasn't been
strictly necessary.
The db batch size estimation normally uses an average block size, or a
default minimum block size, whichever is greater. In this case, as
there's no existing blocks to check for an average block size, the
default should be used.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions