From 7cf5cda6cd82fc8f66330300cc6f807563953c90 Mon Sep 17 00:00:00 2001 From: Grga Date: Tue, 21 Oct 2025 10:01:44 +0200 Subject: [PATCH] Fixed typo with wrong count being used --- CHANGELOG.md | 2 ++ node/src/effects.rs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5a697ebc9..bb3882e2d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -112,6 +112,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 See issue [#1464](https://github.com/o1-labs/mina-rust/issues/1464). Fixed in [#1546](https://github.com/o1-labs/mina-rust/pull/1546/) ([#1546](https://github.com/o1-labs/mina-rust/pull/1546)) +- **transactions**: fixed a typo in `p2p_request_transactions_if_needed` where snark count was used instead of transaction count + ([#1563](https://github.com/o1-labs/mina-rust/pull/1563)). ## v0.17.0 diff --git a/node/src/effects.rs b/node/src/effects.rs index 41a8310e2d..fe3fb08e98 100644 --- a/node/src/effects.rs +++ b/node/src/effects.rs @@ -173,7 +173,10 @@ fn p2p_request_transactions_if_needed(store: &mut Store) { .ready_peers_iter() .filter(|(_, p)| p.channels.transaction.can_send_request()) .map(|(peer_id, _)| { - let pending_txs = state.snark_pool.candidates.peer_work_count(peer_id); + let pending_txs = state + .transaction_pool + .candidates + .peer_transaction_count(peer_id); (peer_id, MAX_PEER_PENDING_TXS.saturating_sub(pending_txs)) }) .filter(|(_, limit)| *limit > 0)