mirror of
https://codeberg.org/wownero/wownero.git
synced 2026-10-17 05:41:49 +02:00
tx_pool: notify txpool event when stem bumps to fluff
(cherry picked from commit 7d5e4842a4876d1b9a60ceddd412c3e168770036)
This commit is contained in:
@@ -1089,7 +1089,7 @@ namespace cryptonote
|
|||||||
const bool res = m_mempool.add_tx(tx, tx_hash, blob, tx_weight, tvc, tx_relay, relayed, version);
|
const bool res = m_mempool.add_tx(tx, tx_hash, blob, tx_weight, tvc, tx_relay, relayed, version);
|
||||||
|
|
||||||
// If new incoming tx passed verification and entered the pool, notify ZMQ
|
// If new incoming tx passed verification and entered the pool, notify ZMQ
|
||||||
if (!tvc.m_verifivation_failed && res && matches_category(tx_relay, relay_category::legacy))
|
if (!tvc.m_verifivation_failed && res && matches_category(tvc.m_relay, relay_category::legacy))
|
||||||
{
|
{
|
||||||
m_blockchain_storage.notify_txpool_event({txpool_event{
|
m_blockchain_storage.notify_txpool_event({txpool_event{
|
||||||
.tx = tx,
|
.tx = tx,
|
||||||
|
|||||||
@@ -337,16 +337,16 @@ namespace cryptonote
|
|||||||
MERROR("internal error: error adding transaction to txpool: " << e.what());
|
MERROR("internal error: error adding transaction to txpool: " << e.what());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static_assert(unsigned(relay_method::none) == 0, "expected relay_method::none value to be zero");
|
|
||||||
if(meta.fee > 0 && tx_relay != relay_method::forward)
|
|
||||||
tvc.m_relay = tx_relay;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tvc.m_verifivation_failed = false;
|
tvc.m_verifivation_failed = false;
|
||||||
if (tvc.m_added_to_pool)
|
if (tvc.m_added_to_pool)
|
||||||
m_txpool_weight += tx_weight;
|
m_txpool_weight += tx_weight;
|
||||||
|
|
||||||
|
static_assert(unsigned(relay_method::none) == 0, "expected relay_method::none value to be zero");
|
||||||
|
if (meta.fee > 0 && tx_relay != relay_method::forward)
|
||||||
|
tvc.m_relay = tx_relay;
|
||||||
|
|
||||||
++m_cookie;
|
++m_cookie;
|
||||||
|
|
||||||
MINFO("Transaction added to pool: txid " << id << " weight: " << tx_weight << " fee/byte: " << (fee / (double)(tx_weight ? tx_weight : 1)) << ", count: " << m_added_txs_by_id.size());
|
MINFO("Transaction added to pool: txid " << id << " weight: " << tx_weight << " fee/byte: " << (fee / (double)(tx_weight ? tx_weight : 1)) << ", count: " << m_added_txs_by_id.size());
|
||||||
|
|||||||
Reference in New Issue
Block a user