Remove code previously made unused and marked unused
This commit is contained in:
parent
d43782f041
commit
800d9b9247
2 changed files with 0 additions and 26 deletions
|
@ -2028,24 +2028,6 @@ bool Blockchain::handle_block_to_main_chain(const block& bl, const crypto::hash&
|
||||||
{
|
{
|
||||||
LOG_PRINT_L3("Blockchain::" << __func__);
|
LOG_PRINT_L3("Blockchain::" << __func__);
|
||||||
|
|
||||||
// NOTE: Omitting check below with have_block() It causes an error after a
|
|
||||||
// blockchain reorganize begins with error: "Attempting to add block to main
|
|
||||||
// chain, but it's already either there or in an alternate"
|
|
||||||
//
|
|
||||||
// A block in the alternative chain, desired to become the main chain, never
|
|
||||||
// makes it due to have_block finding it in he alternative chain.
|
|
||||||
//
|
|
||||||
// Original implementation didn't use it here, and it doesn't appear
|
|
||||||
// necessary to be called from here in this implementation either.
|
|
||||||
|
|
||||||
// if we already have the block, return false
|
|
||||||
// if (have_block(id))
|
|
||||||
// {
|
|
||||||
// LOG_PRINT_L0("Attempting to add block to main chain, but it's already either there or in an alternate chain. hash: " << id);
|
|
||||||
// bvc.m_verifivation_failed = true;
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
TIME_MEASURE_START(block_processing_time);
|
TIME_MEASURE_START(block_processing_time);
|
||||||
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
||||||
if(bl.prev_id != get_tail_id())
|
if(bl.prev_id != get_tail_id())
|
||||||
|
|
|
@ -107,14 +107,6 @@ void BlockchainDB::remove_transaction(const crypto::hash& tx_hash)
|
||||||
{
|
{
|
||||||
transaction tx = get_tx(tx_hash);
|
transaction tx = get_tx(tx_hash);
|
||||||
|
|
||||||
// TODO: This loop calling remove_output() should be removed. It doesn't do
|
|
||||||
// anything (function is empty), and the outputs were already intended to be
|
|
||||||
// removed later as part of remove_transaction_data().
|
|
||||||
for (const tx_out& tx_output : tx.vout)
|
|
||||||
{
|
|
||||||
remove_output(tx_output);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const txin_v& tx_input : tx.vin)
|
for (const txin_v& tx_input : tx.vin)
|
||||||
{
|
{
|
||||||
if (tx_input.type() == typeid(txin_to_key))
|
if (tx_input.type() == typeid(txin_to_key))
|
||||||
|
|
Loading…
Reference in a new issue