From 6a3efa5792ba2c1748dfb3827b0bc2f1ddeb8711 Mon Sep 17 00:00:00 2001 From: sowle Date: Tue, 5 May 2020 13:06:26 +0300 Subject: [PATCH 1/2] additional logging on handshake --- src/p2p/net_node.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 34d930de..7ea6c905 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -1396,7 +1396,7 @@ namespace nodetool get_local_node_data(rsp.node_data); m_payload_handler.get_payload_sync_data(rsp.payload_data); fill_maintainers_entry(rsp.maintrs_entry); - LOG_PRINT_GREEN("COMMAND_HANDSHAKE", LOG_LEVEL_1); + LOG_PRINT_GREEN("COMMAND_HANDSHAKE: v" << arg.payload_data.client_version << " top: " << epee::string_tools::pod_to_hex(arg.payload_data.top_id).substr(0, 6) << " @ " << arg.payload_data.current_height - 1, LOG_LEVEL_1); return 1; } //----------------------------------------------------------------------------------- From 5114824b02e0ab8ea9e7b1e1a0dff9dfbaac290f Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Tue, 5 May 2020 12:53:20 +0200 Subject: [PATCH 2/2] softened alt blocks purge validation due to new onboard_transactions concept --- src/currency_core/blockchain_storage.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/currency_core/blockchain_storage.cpp b/src/currency_core/blockchain_storage.cpp index 54b45be9..02f51e92 100644 --- a/src/currency_core/blockchain_storage.cpp +++ b/src/currency_core/blockchain_storage.cpp @@ -1533,7 +1533,6 @@ bool blockchain_storage::purge_altblock_keyimages_from_big_heap(const block& b, std::shared_ptr tx_ptr; if (!get_transaction_from_pool_or_db(tx_id, tx_ptr)) { - LOG_ERROR("failed to get alt block tx " << tx_id << " on block detach from alts"); continue; } transaction& tx = *tx_ptr; @@ -6006,7 +6005,11 @@ bool blockchain_storage::get_transaction_from_pool_or_db(const crypto::hash& tx_ if (!m_tx_pool.get_transaction(tx_id, *tx_ptr)) // first try to get from the pool { auto p = m_db_transactions.get(tx_id); // if not found in the pool -- get from the DB - CHECK_AND_ASSERT_MES(p != nullptr, false, "can't get tx " << tx_id << " neither from the pool, nor from db_transactions"); + if (p == nullptr) + { + return false; + } + //CHECK_AND_ASSERT_MES(p != nullptr, false, "can't get tx " << tx_id << " neither from the pool, nor from db_transactions"); CHECK_AND_ASSERT_MES(p->m_keeper_block_height >= min_allowed_block_height, false, "tx " << tx_id << " found in the main chain at height " << p->m_keeper_block_height << " while required min allowed height is " << min_allowed_block_height); *tx_ptr = p->tx; }