Skip to content

Commit

Permalink
Merge pull request #122 from stoffu/aeon-lazypool-fix
Browse files Browse the repository at this point in the history
tx_pool: fix wrong timing of tx parsing
  • Loading branch information
aeonix authored Jul 15, 2019
2 parents 4b8cf32 + feb4fb5 commit ff2afb8
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/cryptonote_core/tx_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,21 @@ namespace cryptonote
cryptonote::blobdata txblob = m_blockchain.get_txpool_tx_blob(sorted_it->second);
cryptonote::transaction tx;

// Skip transactions that are not ready to be
// included into the blockchain or that are
// missing key images
const cryptonote::txpool_tx_meta_t original_meta = meta;
bool ready = false;
try
{
ready = is_transaction_ready_to_go(meta, sorted_it->second, txblob, tx);
}
catch (const std::exception &e)
{
MERROR("Failed to check transaction readiness: " << e.what());
// continue, not fatal
}

bool is_nofake_tx = false;
bool can_nofake_tx_be_simply_added = false;
bool can_nofake_tx_replace_existing_tx = false;
Expand Down Expand Up @@ -1359,20 +1374,6 @@ namespace cryptonote
}
}

// Skip transactions that are not ready to be
// included into the blockchain or that are
// missing key images
const cryptonote::txpool_tx_meta_t original_meta = meta;
bool ready = false;
try
{
ready = is_transaction_ready_to_go(meta, sorted_it->second, txblob, tx);
}
catch (const std::exception &e)
{
MERROR("Failed to check transaction readiness: " << e.what());
// continue, not fatal
}
if (memcmp(&original_meta, &meta, sizeof(meta)))
{
try
Expand Down

0 comments on commit ff2afb8

Please sign in to comment.