mirror of
https://github.com/monero-project/monero.git
synced 2025-12-05 20:40:22 -08:00
Compare commits
4 Commits
6f2574d9d2
...
516e5355a1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
516e5355a1 | ||
|
|
14f3d408ad | ||
|
|
4e4e3439c9 | ||
|
|
90dad18bfb |
@@ -1302,20 +1302,23 @@ namespace cryptonote
|
|||||||
NOTIFY_NEW_FLUFFY_BLOCK::request arg{};
|
NOTIFY_NEW_FLUFFY_BLOCK::request arg{};
|
||||||
arg.current_blockchain_height = m_blockchain_storage.get_current_blockchain_height();
|
arg.current_blockchain_height = m_blockchain_storage.get_current_blockchain_height();
|
||||||
std::vector<crypto::hash> missed_txs;
|
std::vector<crypto::hash> missed_txs;
|
||||||
std::vector<cryptonote::blobdata> txs;
|
for (const auto &tx_hash : b.tx_hashes)
|
||||||
m_blockchain_storage.get_transactions_blobs(b.tx_hashes, txs, missed_txs);
|
{
|
||||||
|
if (m_blockchain_storage.have_tx(tx_hash))
|
||||||
|
continue;
|
||||||
|
missed_txs.push_back(tx_hash);
|
||||||
|
}
|
||||||
if(missed_txs.size() && m_blockchain_storage.get_block_id_by_height(get_block_height(b)) != get_block_hash(b))
|
if(missed_txs.size() && m_blockchain_storage.get_block_id_by_height(get_block_height(b)) != get_block_hash(b))
|
||||||
{
|
{
|
||||||
LOG_PRINT_L1("Block found but, seems that reorganize just happened after that, do not relay this block");
|
LOG_PRINT_L1("Block found but, seems that reorganize just happened after that, do not relay this block");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
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()
|
CHECK_AND_ASSERT_MES(!missed_txs.size(), false, "can't find some transactions in found block:" << get_block_hash(b)
|
||||||
<< ", b.tx_hashes.size()=" << b.tx_hashes.size() << ", missed_txs.size()" << missed_txs.size());
|
<< " b.tx_hashes.size()=" << b.tx_hashes.size() << ", missed_txs.size()" << missed_txs.size());
|
||||||
|
|
||||||
block_to_blob(b, arg.b.block);
|
block_to_blob(b, arg.b.block);
|
||||||
//pack transactions
|
// Relay an empty fluffy block
|
||||||
for(auto& tx: txs)
|
arg.b.txs.clear();
|
||||||
arg.b.txs.push_back({tx, crypto::null_hash});
|
|
||||||
|
|
||||||
m_pprotocol->relay_block(arg, exclude_context);
|
m_pprotocol->relay_block(arg, exclude_context);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -344,7 +344,8 @@ namespace cryptonote
|
|||||||
}
|
}
|
||||||
|
|
||||||
tvc.m_verifivation_failed = false;
|
tvc.m_verifivation_failed = false;
|
||||||
m_txpool_weight += tx_weight;
|
if (tvc.m_added_to_pool)
|
||||||
|
m_txpool_weight += tx_weight;
|
||||||
|
|
||||||
++m_cookie;
|
++m_cookie;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user