mirror of
https://github.com/monero-project/monero.git
synced 2025-12-09 00:21:28 +09:00
Send ZMQ miner notifications after txpool additions
Bug was introduced in c069c04ede338929c50297558fee15192aa0f67c, before this txpool additions were not notified on block addition When receiving blocks with previously unknown conditions, miner data was sent first, but txpool add events for already-added transactions in previous block were sent afterward. Miners would then include already-mined transactions in their new templates due to receiving the mistimed txpool add event. The fix is to send miner notifications AFTER txpool events are sent, and before normal block notifications are sent (for mining switch speed purposes) Fixes c069c04ede338929c50297558fee15192aa0f67c / #9135 Fixes dfee15eee18a97be5a8fb9822527f98ebd1b33e9 / #7891
This commit is contained in:
parent
0eaac4445e
commit
39c7a22856
@ -4532,11 +4532,14 @@ leave:
|
||||
}
|
||||
|
||||
const crypto::hash seedhash = get_block_id_by_height(crypto::rx_seedheight(new_height));
|
||||
send_miner_notifications(new_height, seedhash, id, already_generated_coins);
|
||||
|
||||
// Make sure that txpool notifications happen BEFORE block notifications
|
||||
// Make sure that txpool notifications happen BEFORE block and miner data notifications
|
||||
notify_txpool_event(std::move(txpool_events));
|
||||
|
||||
// send miner notifications to switch as soon as possible
|
||||
send_miner_notifications(new_height, seedhash, id, already_generated_coins);
|
||||
|
||||
// then send block notifications
|
||||
for (const auto& notifier: m_block_notifiers)
|
||||
notifier(new_height - 1, {std::addressof(bl), 1});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user