aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobtoht <tob@featherwallet.org>2026-04-24 15:35:07 +0000
committertobtoht <tob@featherwallet.org>2026-04-24 15:35:07 +0000
commit7879d9b68b278f8e9e72955cf6fe9fe3369ba1be (patch)
tree0709805e63728b20ce60ae47f433de34427036ce
parented49e56c13029ba8edbedd97076a8390361bb1c5 (diff)
parent73f1eaaed6defa6fc25fc7e74b51679e365cb7e5 (diff)
downloadmonzero-core-7879d9b68b278f8e9e72955cf6fe9fe3369ba1be.tar.gz
monzero-core-7879d9b68b278f8e9e72955cf6fe9fe3369ba1be.tar.xz
monzero-core-7879d9b68b278f8e9e72955cf6fe9fe3369ba1be.zip
Merge pull request #10399
73f1eaa Fix ZMQ-PUB reporting of mempool txes that were initially in stem phase (Lee Clagett)
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp2
-rw-r--r--src/cryptonote_core/tx_pool.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index 18625de98..b80fba05c 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -1089,7 +1089,7 @@ namespace cryptonote
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 (!tvc.m_verifivation_failed && tvc.m_added_to_pool && matches_category(tx_relay, relay_category::legacy))
+ if (!tvc.m_verifivation_failed && res && matches_category(tx_relay, relay_category::legacy))
{
m_blockchain_storage.notify_txpool_event({txpool_event{
.tx = tx,
diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h
index ed75a3dfc..f3630368b 100644
--- a/src/cryptonote_core/tx_pool.h
+++ b/src/cryptonote_core/tx_pool.h
@@ -112,6 +112,8 @@ namespace cryptonote
* @param id the transaction's hash
* @tx_relay how the transaction was received
* @param tx_weight the transaction's weight
+ * @return True if tx passes verification checks AND is first observation
+ * of tx in `broadcasted` relay method.
*/
bool add_tx(transaction &tx, const crypto::hash &id, const cryptonote::blobdata &blob,
size_t tx_weight, tx_verification_context& tvc, relay_method tx_relay, bool relayed,
@@ -138,7 +140,8 @@ namespace cryptonote
* passes the non-input consensus tests (e.g. for newly received relayed txs), then leave
* "nic_verified_hf_version" as its default value of 0 (there is no v0 fork).
*
- * @return true if the transaction passes validations, otherwise false
+ * @return True if tx passes verification checks AND is first observation
+ * of tx in `broadcasted` relay method.
*/
bool add_tx(transaction &tx, tx_verification_context& tvc, relay_method tx_relay, bool relayed,
uint8_t version, uint8_t nic_verified_hf_version = 0);