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/cryptonote_core/cryptonote_core.cpp | |
| parent | 60b064c7597c6cb6c5ff44c8d6a9abc82e00f525 (diff) | |
| download | monzero-core-3b1d7e03fcc1caa8898ced33e127f6ba09d66df8.tar.gz monzero-core-3b1d7e03fcc1caa8898ced33e127f6ba09d66df8.tar.xz monzero-core-3b1d7e03fcc1caa8898ced33e127f6ba09d66df8.zip | |
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 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 608abea19..ac0be5a07 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -358,6 +358,10 @@ namespace cryptonote r = m_blockchain_storage.init(db, m_testnet, m_fakechain); + // now that we have a valid m_blockchain_storage, we can clean out any + // transactions in the pool that do not conform to the current fork + m_mempool.validate(m_blockchain_storage.get_current_hard_fork_version()); + bool show_time_stats = command_line::get_arg(vm, command_line::arg_show_time_stats) != 0; m_blockchain_storage.set_show_time_stats(show_time_stats); #else @@ -607,7 +611,8 @@ namespace cryptonote return true; } - return m_mempool.add_tx(tx, tx_hash, blob_size, tvc, keeped_by_block, relayed); + uint8_t version = m_blockchain_storage.get_current_hard_fork_version(); + return m_mempool.add_tx(tx, tx_hash, blob_size, tvc, keeped_by_block, relayed, version); } //----------------------------------------------------------------------------------------------- bool core::relay_txpool_transactions() |
