@@ -4258,7 +4258,16 @@ nlohmann::json MiningInterface::mining_submit(const std::string& username, const
42584258 static uint256 s_last_submitted_prev;
42594259 if (prev_block != s_last_submitted_prev) {
42604260 s_last_submitted_prev = prev_block;
4261- LOG_INFO << " [LTC] Block meets blockchain target! Submitting to coin daemon" ;
4261+ uint256 block_hash = Hash (std::span<const unsigned char >(block_bytes.data (), block_bytes.size ()));
4262+ LOG_WARNING << " \n "
4263+ << " ######################################################################\n "
4264+ << " ### PARENT NETWORK BLOCK FOUND! ###\n "
4265+ << " ######################################################################\n "
4266+ << " Miner: " << username << " \n "
4267+ << " Block hash: " << block_hash.GetHex () << " \n "
4268+ << " PoW hash: " << pow_hash.GetHex () << " \n "
4269+ << " Target: " << block_target.GetHex () << " \n "
4270+ << " ######################################################################" ;
42624271 submitblock (block_hex);
42634272 }
42644273 }
@@ -4527,14 +4536,6 @@ nlohmann::json MiningInterface::mining_submit(const std::string& username, const
45274536 }
45284537
45294538 if (!block_target.IsNull () && pow_hash <= block_target) {
4530- // Twin block: same PoW hash meets BOTH parent and merged targets!
4531- if (merged_found) {
4532- LOG_INFO << " \n "
4533- << " *** TWIN BLOCK! ***\n "
4534- << " Parent + merged chain targets met by same PoW hash\n "
4535- << " PoW hash: " << pow_hash.GetHex ();
4536- }
4537-
45384539 uint256 header_merkle;
45394540 std::memcpy (header_merkle.data (), block_bytes.data () + 36 , 32 );
45404541
@@ -4559,7 +4560,28 @@ nlohmann::json MiningInterface::mining_submit(const std::string& username, const
45594560 static uint256 s_last_pool_submitted_prev;
45604561 if (prev_block != s_last_pool_submitted_prev) {
45614562 s_last_pool_submitted_prev = prev_block;
4562- LOG_INFO << " [LTC] Pool block merkle_root validated, submitting to coin daemon" ;
4563+ uint256 block_hash = Hash (std::span<const unsigned char >(block_bytes.data (), block_bytes.size ()));
4564+ if (merged_found) {
4565+ LOG_WARNING << " \n "
4566+ << " ######################################################################\n "
4567+ << " ### TWIN BLOCK FOUND! Parent + Merged in same PoW! ###\n "
4568+ << " ######################################################################\n "
4569+ << " Miner: " << username << " \n "
4570+ << " Block hash: " << block_hash.GetHex () << " \n "
4571+ << " PoW hash: " << pow_hash.GetHex () << " \n "
4572+ << " Target: " << block_target.GetHex () << " \n "
4573+ << " ######################################################################" ;
4574+ } else {
4575+ LOG_WARNING << " \n "
4576+ << " ######################################################################\n "
4577+ << " ### PARENT NETWORK BLOCK FOUND! ###\n "
4578+ << " ######################################################################\n "
4579+ << " Miner: " << username << " \n "
4580+ << " Block hash: " << block_hash.GetHex () << " \n "
4581+ << " PoW hash: " << pow_hash.GetHex () << " \n "
4582+ << " Target: " << block_target.GetHex () << " \n "
4583+ << " ######################################################################" ;
4584+ }
45634585 submitblock (block_hex);
45644586 }
45654587 }
0 commit comments