diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-01-29 19:24:24 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-01-29 19:24:24 +0200 |
commit | b91fc2dc3c4489f44a74915ae80fd1968d150302 (patch) | |
tree | 96f432c221f6edb336b65000acf30f0c45e3efa9 /src/blockchain_utilities | |
parent | Merge pull request #628 (diff) | |
parent | tx_pool: do not accept txes not in a block if they timed out before (diff) | |
download | monero-b91fc2dc3c4489f44a74915ae80fd1968d150302.tar.xz |
Merge pull request #629
94b98fb tx_pool: do not accept txes not in a block if they timed out before (moneromooo-monero)
eadbdf3 tx_pool: fix use of invalidated iterator (moneromooo-monero)
3b1d7e0 Fix V1/V2 use of hard fork related parameters (moneromooo-monero)
Diffstat (limited to 'src/blockchain_utilities')
-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); |