diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-02-08 19:52:36 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-02-08 19:52:36 +0200 |
commit | 24ccdb9b6e674fa8b41e76b0f9c956b81f2e075a (patch) | |
tree | 498d7056b539a76605d40c952002c336187a42fd /src/blockchain_utilities | |
parent | Merge pull request #644 (diff) | |
parent | Blockchain: Update comments on removing block (diff) | |
download | monero-24ccdb9b6e674fa8b41e76b0f9c956b81f2e075a.tar.xz |
Merge pull request #650
e298b14 Blockchain: Update comments on removing block (warptangent)
b368e29 blockchain_import: Get hard fork version from HardFork (warptangent)
e02577f Move HardFork DB update to BlockchainDB::add_block() (warptangent)
3800875 Make HardFork object available to BlockchainDB and derived DB implementations (warptangent)
fd46c96 BlockchainDB/LMDB: Refactor block-scope DB txn handling for add block (warptangent)
f3a6000 BlockchainDB/LMDB/BDB: Extract DB txn functions for block add/remove (warptangent)
f47d5b0 BlockchainLMDB: Allow two HardFork functions to update DB during block add (warptangent)
15ee0be BlockchainLMDB: extract txn macros used during block add/remove (warptangent)
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r-- | src/blockchain_utilities/blockchain_import.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index 7eb493b6d..d3045a229 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -400,11 +400,8 @@ int import_from_file(FakeCore& simple_core, const std::string& import_file_path, // size_t blob_size = 0; // get_transaction_hash(tx, hsh, blob_size); - // we'd need to get the starting heights from the daemon - // to be correct once voting kicks in - uint64_t v2height = opt_testnet ? 624634 : 1009827; - uint8_t version = h < v2height ? 1 : 2; + uint8_t version = simple_core.m_storage.get_current_hard_fork_version(); tx_verification_context tvc = AUTO_VAL_INIT(tvc); bool r = true; r = simple_core.m_pool.add_tx(tx, tvc, true, true, version); @@ -469,9 +466,6 @@ int import_from_file(FakeCore& simple_core, const std::string& import_file_path, try { simple_core.add_block(b, block_size, cumulative_difficulty, coins_generated, txs); - #if !defined(BLOCKCHAIN_DB) || (BLOCKCHAIN_DB == DB_LMDB) - simple_core.m_hardfork->add(b, h-1); - #endif } catch (const std::exception& e) { |