mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: dont use tmp lock vars (#10092)
This commit is contained in:
@ -600,19 +600,15 @@ where
|
||||
/// Notifies transaction listeners about changes once a block was processed.
|
||||
fn notify_on_new_state(&self, outcome: OnNewCanonicalStateOutcome<T::Transaction>) {
|
||||
// notify about promoted pending transactions
|
||||
{
|
||||
// emit hashes
|
||||
let mut transaction_hash_listeners = self.pending_transaction_listener.lock();
|
||||
transaction_hash_listeners.retain_mut(|listener| {
|
||||
listener.send_all(outcome.pending_transactions(listener.kind))
|
||||
});
|
||||
// emit hashes
|
||||
self.pending_transaction_listener
|
||||
.lock()
|
||||
.retain_mut(|listener| listener.send_all(outcome.pending_transactions(listener.kind)));
|
||||
|
||||
// emit full transactions
|
||||
let mut transaction_full_listeners = self.transaction_listener.lock();
|
||||
transaction_full_listeners.retain_mut(|listener| {
|
||||
listener.send_all(outcome.full_pending_transactions(listener.kind))
|
||||
})
|
||||
}
|
||||
// emit full transactions
|
||||
self.transaction_listener.lock().retain_mut(|listener| {
|
||||
listener.send_all(outcome.full_pending_transactions(listener.kind))
|
||||
});
|
||||
|
||||
let OnNewCanonicalStateOutcome { mined, promoted, discarded, block_hash } = outcome;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user