aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain_storage.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-01-29 15:09:17 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-01-29 17:21:11 +0000
commit3b1d7e03fcc1caa8898ced33e127f6ba09d66df8 (patch)
treedbec9bdbe5dc27b3c420433b99750ef036827489 /src/cryptonote_core/blockchain_storage.cpp
parent60b064c7597c6cb6c5ff44c8d6a9abc82e00f525 (diff)
downloadmonzero-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/blockchain_storage.cpp')
-rw-r--r--src/cryptonote_core/blockchain_storage.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cryptonote_core/blockchain_storage.cpp b/src/cryptonote_core/blockchain_storage.cpp
index 3034cf3f7..f656f938b 100644
--- a/src/cryptonote_core/blockchain_storage.cpp
+++ b/src/cryptonote_core/blockchain_storage.cpp
@@ -301,7 +301,7 @@ bool blockchain_storage::purge_transaction_from_blockchain(const crypto::hash& t
if(!is_coinbase(tx))
{
cryptonote::tx_verification_context tvc = AUTO_VAL_INIT(tvc);
- bool r = m_tx_pool->add_tx(tx, tvc, true, true);
+ bool r = m_tx_pool->add_tx(tx, tvc, true, true, 1);
CHECK_AND_ASSERT_MES(r, false, "purge_block_data_from_blockchain: failed to add transaction to transaction pool");
}
@@ -1699,7 +1699,7 @@ bool blockchain_storage::handle_block_to_main_chain(const block& bl, const crypt
{
LOG_PRINT_L1("Block with id: " << id << "has at least one transaction (id: " << tx_id << ") with wrong inputs.");
cryptonote::tx_verification_context tvc = AUTO_VAL_INIT(tvc);
- bool add_res = m_tx_pool->add_tx(tx, tvc, true, relayed);
+ bool add_res = m_tx_pool->add_tx(tx, tvc, true, relayed, 1);
CHECK_AND_ASSERT_MES2(add_res, "handle_block_to_main_chain: failed to add transaction back to transaction pool");
purge_block_data_from_blockchain(bl, tx_processed_count);
add_block_as_invalid(bl, id);
@@ -1712,7 +1712,7 @@ bool blockchain_storage::handle_block_to_main_chain(const block& bl, const crypt
{
LOG_PRINT_L1("Block with id: " << id << " failed to add transaction to blockchain storage");
cryptonote::tx_verification_context tvc = AUTO_VAL_INIT(tvc);
- bool add_res = m_tx_pool->add_tx(tx, tvc, true, relayed);
+ bool add_res = m_tx_pool->add_tx(tx, tvc, true, relayed, 1);
CHECK_AND_ASSERT_MES2(add_res, "handle_block_to_main_chain: failed to add transaction back to transaction pool");
purge_block_data_from_blockchain(bl, tx_processed_count);
bvc.m_verifivation_failed = true;
@@ -1787,8 +1787,8 @@ bool blockchain_storage::update_next_comulative_size_limit()
get_last_n_blocks_sizes(sz, CRYPTONOTE_REWARD_BLOCKS_WINDOW);
uint64_t median = epee::misc_utils::median(sz);
- if(median <= CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE)
- median = CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE;
+ if(median <= CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V1)
+ median = CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V1;
m_current_block_cumul_sz_limit = median*2;
return true;