check if tx from alt block exists in chain before adding to pool

pull/9135/head
jeffro256 3 months ago
parent 5376829502
commit aa99643e43
No known key found for this signature in database
GPG Key ID: 6F79797A6E392442

@ -2081,6 +2081,7 @@ bool Blockchain::handle_alternative_block(const block& b, const crypto::hash& id
tx_verification_context tvc{};
CRITICAL_REGION_LOCAL(m_tx_pool);
if (!m_tx_pool.have_tx(txid, relay_category::all) &&
!m_db->tx_exists(txid) &&
!m_tx_pool.add_tx(tx, tvc, relay_method::block, /*relayed=*/true, hf_version, hf_version)
|| tvc.m_verifivation_failed)
{

Loading…
Cancel
Save