mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
cryptonote_core: reject duplicate tx hashes before pool lookup
(cherry picked from commit 03f957c18c8818c3c25b75d771fe48c37036b6e3)
This commit is contained in:
@@ -1268,6 +1268,9 @@ namespace cryptonote
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
block_complete_entry get_block_complete_entry(block& b, tx_memory_pool &pool)
|
||||
{
|
||||
const std::unordered_set<crypto::hash> tx_hashes(b.tx_hashes.cbegin(), b.tx_hashes.cend());
|
||||
CHECK_AND_ASSERT_THROW_MES(tx_hashes.size() == b.tx_hashes.size(), "Duplicate transaction hashes in block");
|
||||
|
||||
block_complete_entry bce;
|
||||
bce.block = cryptonote::block_to_blob(b);
|
||||
bce.block_weight = 0; // we can leave it to 0, those txes aren't pruned
|
||||
|
||||
Reference in New Issue
Block a user