diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-01-29 15:09:17 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-01-29 17:21:11 +0000 |
commit | 3b1d7e03fcc1caa8898ced33e127f6ba09d66df8 (patch) | |
tree | dbec9bdbe5dc27b3c420433b99750ef036827489 /src/blockchain_utilities/blockchain_import.cpp | |
parent | Merge pull request #626 (diff) | |
download | monero-3b1d7e03fcc1caa8898ced33e127f6ba09d66df8.tar.xz |
Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking
for next (voted upon) fork.
Diffstat (limited to '')
-rw-r--r-- | src/blockchain_utilities/blockchain_import.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index 85ab883f4..30090bd78 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -399,9 +399,15 @@ int import_from_file(FakeCore& simple_core, const std::string& import_file_path, // crypto::hash hsh = null_hash; // 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; tx_verification_context tvc = AUTO_VAL_INIT(tvc); bool r = true; - r = simple_core.m_pool.add_tx(tx, tvc, true, true); + r = simple_core.m_pool.add_tx(tx, tvc, true, true, version); if (!r) { LOG_PRINT_RED_L0("failed to add transaction to transaction pool, height=" << h <<", tx_num=" << tx_num); |