mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 13:23:29 +01:00
Merge pull request #2246
d732c73e
blockchain: remove a few unused variables (moneromooo-monero)
This commit is contained in:
commit
12c70fedc0
@ -125,8 +125,8 @@ static const uint64_t testnet_hard_fork_version_1_till = 624633;
|
|||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
Blockchain::Blockchain(tx_memory_pool& tx_pool) :
|
Blockchain::Blockchain(tx_memory_pool& tx_pool) :
|
||||||
m_db(), m_tx_pool(tx_pool), m_hardfork(NULL), m_timestamps_and_difficulties_height(0), m_current_block_cumul_sz_limit(0), m_is_in_checkpoint_zone(false),
|
m_db(), m_tx_pool(tx_pool), m_hardfork(NULL), m_timestamps_and_difficulties_height(0), m_current_block_cumul_sz_limit(0),
|
||||||
m_is_blockchain_storing(false), m_enforce_dns_checkpoints(false), m_max_prepare_blocks_threads(4), m_db_blocks_per_sync(1), m_db_sync_mode(db_async), m_fast_sync(true), m_show_time_stats(false), m_sync_counter(0), m_cancel(false)
|
m_enforce_dns_checkpoints(false), m_max_prepare_blocks_threads(4), m_db_blocks_per_sync(1), m_db_sync_mode(db_async), m_fast_sync(true), m_show_time_stats(false), m_sync_counter(0), m_cancel(false)
|
||||||
{
|
{
|
||||||
LOG_PRINT_L3("Blockchain::" << __func__);
|
LOG_PRINT_L3("Blockchain::" << __func__);
|
||||||
}
|
}
|
||||||
@ -1353,7 +1353,6 @@ bool Blockchain::handle_alternative_block(const block& b, const crypto::hash& id
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check the block's hash against the difficulty target for its alt chain
|
// Check the block's hash against the difficulty target for its alt chain
|
||||||
m_is_in_checkpoint_zone = false;
|
|
||||||
difficulty_type current_diff = get_next_difficulty_for_alternative_chain(alt_chain, bei);
|
difficulty_type current_diff = get_next_difficulty_for_alternative_chain(alt_chain, bei);
|
||||||
CHECK_AND_ASSERT_MES(current_diff, false, "!!!!!!! DIFFICULTY OVERHEAD !!!!!!!");
|
CHECK_AND_ASSERT_MES(current_diff, false, "!!!!!!! DIFFICULTY OVERHEAD !!!!!!!");
|
||||||
crypto::hash proof_of_work = null_hash;
|
crypto::hash proof_of_work = null_hash;
|
||||||
@ -2499,7 +2498,6 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
|
|||||||
assert(it != m_check_txin_table.end());
|
assert(it != m_check_txin_table.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t t_t1 = 0;
|
|
||||||
std::vector<std::vector<rct::ctkey>> pubkeys(tx.vin.size());
|
std::vector<std::vector<rct::ctkey>> pubkeys(tx.vin.size());
|
||||||
std::vector < uint64_t > results;
|
std::vector < uint64_t > results;
|
||||||
results.resize(tx.vin.size(), 0);
|
results.resize(tx.vin.size(), 0);
|
||||||
@ -2633,7 +2631,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
|
|||||||
|
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
MERROR_VER("Failed to check ring signatures!, t_loop: " << t_t1);
|
MERROR_VER("Failed to check ring signatures!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2782,12 +2780,6 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
|
|||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
void Blockchain::check_ring_signature(const crypto::hash &tx_prefix_hash, const crypto::key_image &key_image, const std::vector<rct::ctkey> &pubkeys, const std::vector<crypto::signature>& sig, uint64_t &result)
|
void Blockchain::check_ring_signature(const crypto::hash &tx_prefix_hash, const crypto::key_image &key_image, const std::vector<rct::ctkey> &pubkeys, const std::vector<crypto::signature>& sig, uint64_t &result)
|
||||||
{
|
{
|
||||||
if (m_is_in_checkpoint_zone)
|
|
||||||
{
|
|
||||||
result = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<const crypto::public_key *> p_output_keys;
|
std::vector<const crypto::public_key *> p_output_keys;
|
||||||
for (auto &key : pubkeys)
|
for (auto &key : pubkeys)
|
||||||
{
|
{
|
||||||
|
@ -585,7 +585,7 @@ namespace cryptonote
|
|||||||
*
|
*
|
||||||
* @return true if Blockchain is having the chain stored currently, else false
|
* @return true if Blockchain is having the chain stored currently, else false
|
||||||
*/
|
*/
|
||||||
bool is_storing_blockchain()const{return m_is_blockchain_storing;}
|
bool is_storing_blockchain()const{return false;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief gets the difficulty of the block with a given height
|
* @brief gets the difficulty of the block with a given height
|
||||||
@ -943,8 +943,6 @@ namespace cryptonote
|
|||||||
|
|
||||||
|
|
||||||
checkpoints m_checkpoints;
|
checkpoints m_checkpoints;
|
||||||
std::atomic<bool> m_is_in_checkpoint_zone;
|
|
||||||
std::atomic<bool> m_is_blockchain_storing;
|
|
||||||
bool m_enforce_dns_checkpoints;
|
bool m_enforce_dns_checkpoints;
|
||||||
|
|
||||||
HardFork *m_hardfork;
|
HardFork *m_hardfork;
|
||||||
|
Loading…
Reference in New Issue
Block a user