@@ -1312,20 +1312,23 @@ namespace cryptonote
13121312 NOTIFY_NEW_FLUFFY_BLOCK::request arg{};
13131313 arg.current_blockchain_height = m_blockchain_storage.get_current_blockchain_height ();
13141314 std::vector<crypto::hash> missed_txs;
1315- std::vector<cryptonote::blobdata> txs;
1316- m_blockchain_storage.get_transactions_blobs (b.tx_hashes , txs, missed_txs);
1315+ for (const auto &tx_hash : b.tx_hashes )
1316+ {
1317+ if (m_blockchain_storage.have_tx (tx_hash))
1318+ continue ;
1319+ missed_txs.push_back (tx_hash);
1320+ }
13171321 if (missed_txs.size () && m_blockchain_storage.get_block_id_by_height (get_block_height (b)) != get_block_hash (b))
13181322 {
13191323 LOG_PRINT_L1 (" Block found but, seems that reorganize just happened after that, do not relay this block" );
13201324 return true ;
13211325 }
1322- CHECK_AND_ASSERT_MES (txs. size () == b. tx_hashes . size () && !missed_txs.size (), false , " can't find some transactions in found block:" << get_block_hash (b) << " txs.size()= " << txs. size ( )
1323- << " , b.tx_hashes.size()=" << b.tx_hashes .size () << " , missed_txs.size()" << missed_txs.size ());
1326+ CHECK_AND_ASSERT_MES (!missed_txs.size (), false , " can't find some transactions in found block:" << get_block_hash (b)
1327+ << " b.tx_hashes.size()=" << b.tx_hashes .size () << " , missed_txs.size()" << missed_txs.size ());
13241328
13251329 block_to_blob (b, arg.b .block );
1326- // pack transactions
1327- for (auto & tx: txs)
1328- arg.b .txs .push_back ({tx, crypto::null_hash});
1330+ // Relay an empty fluffy block
1331+ arg.b .txs .clear ();
13291332
13301333 m_pprotocol->relay_block (arg, exclude_context);
13311334 }
0 commit comments