monero/src/cryptonote_core
warptangent 909ea81067
Remove a have_block() check so alternate block can be processed
Remove have_block() check from Blockchain::handle_block_to_main_chain().
Add logging to have_block().

This allows blockchain reorganization to proceed further.

have_block() check here 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 chain."

While reorganizing to become the main chain, a block in the
alternative chain would be refused due to have_block() rightfully
finding it in the alternative chain. The reorganization would end in
rollback, restoring to previous blockchain.

Original implementation didn't call it here, and it doesn't appear
necessary to be called from here in this implementation either. When
needed, it appears it's called prior to handle_block_to_main_chain().
2015-01-11 21:23:02 -08:00
..
BlockchainDB_impl Complete implementation of transaction removal 2015-01-11 21:22:09 -08:00
account.cpp year updated in license 2015-01-02 18:52:46 +02:00
account.h year updated in license 2015-01-02 18:52:46 +02:00
account_boost_serialization.h year updated in license 2015-01-02 18:52:46 +02:00
blockchain.cpp Remove a have_block() check so alternate block can be processed 2015-01-11 21:23:02 -08:00
blockchain.h blockchain: add consts where appropriate 2015-01-04 19:39:41 -08:00
blockchain_db.cpp Complete implementation of transaction removal 2015-01-11 21:22:09 -08:00
blockchain_db.h Complete implementation of transaction removal 2015-01-11 21:22:09 -08:00
blockchain_storage.cpp blockchain_storage: refactor genesis block creation 2015-01-04 19:39:41 -08:00
blockchain_storage.h blockchain_storage: refactor genesis block creation 2015-01-04 19:39:41 -08:00
blockchain_storage_boost_serialization.h year updated in license 2015-01-02 18:52:46 +02:00
checkpoints.cpp Fixes segfault in Blockchain::handle_alternative_block 2015-01-09 05:56:51 -05:00
checkpoints.h checkpoints: add consts where appropriate 2015-01-04 19:39:41 -08:00
checkpoints_create.cpp year updated in license 2015-01-02 18:52:46 +02:00
checkpoints_create.h year updated in license 2015-01-02 18:52:46 +02:00
CMakeLists.txt build: add liblmdb to the cmake autodetection system 2015-01-04 19:39:40 -08:00
connection_context.h year updated in license 2015-01-02 18:52:46 +02:00
cryptonote_basic.h year updated in license 2015-01-02 18:52:46 +02:00
cryptonote_basic_impl.cpp year updated in license 2015-01-02 18:52:46 +02:00
cryptonote_basic_impl.h year updated in license 2015-01-02 18:52:46 +02:00
cryptonote_boost_serialization.h year updated in license 2015-01-02 18:52:46 +02:00
cryptonote_core.cpp Integrate BlockchainDB into cryptonote_core 2015-01-04 19:29:51 -08:00
cryptonote_core.h Integrate BlockchainDB into cryptonote_core 2015-01-04 19:29:51 -08:00
cryptonote_format_utils.cpp year updated in license 2015-01-02 18:52:46 +02:00
cryptonote_format_utils.h year updated in license 2015-01-02 18:52:46 +02:00
cryptonote_stat_info.h year updated in license 2015-01-02 18:52:46 +02:00
difficulty.cpp year updated in license 2015-01-02 18:52:46 +02:00
difficulty.h year updated in license 2015-01-02 18:52:46 +02:00
miner.cpp year updated in license 2015-01-02 18:52:46 +02:00
miner.h year updated in license 2015-01-02 18:52:46 +02:00
tx_extra.h year updated in license 2015-01-02 18:52:46 +02:00
tx_pool.cpp Integrate BlockchainDB into cryptonote_core 2015-01-04 19:29:51 -08:00
tx_pool.h Integrate BlockchainDB into cryptonote_core 2015-01-04 19:29:51 -08:00
verification_context.h year updated in license 2015-01-02 18:52:46 +02:00