Skip to content

Commit 7cf5cda

Browse files
committed
Fixed typo with wrong count being used
1 parent e11aad6 commit 7cf5cda

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
112112
See issue [#1464](https://github.com/o1-labs/mina-rust/issues/1464).
113113
Fixed in [#1546](https://github.com/o1-labs/mina-rust/pull/1546/)
114114
([#1546](https://github.com/o1-labs/mina-rust/pull/1546))
115+
- **transactions**: fixed a typo in `p2p_request_transactions_if_needed` where snark count was used instead of transaction count
116+
([#1563](https://github.com/o1-labs/mina-rust/pull/1563)).
115117

116118
## v0.17.0
117119

node/src/effects.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ fn p2p_request_transactions_if_needed<S: Service>(store: &mut Store<S>) {
173173
.ready_peers_iter()
174174
.filter(|(_, p)| p.channels.transaction.can_send_request())
175175
.map(|(peer_id, _)| {
176-
let pending_txs = state.snark_pool.candidates.peer_work_count(peer_id);
176+
let pending_txs = state
177+
.transaction_pool
178+
.candidates
179+
.peer_transaction_count(peer_id);
177180
(peer_id, MAX_PEER_PENDING_TXS.saturating_sub(pending_txs))
178181
})
179182
.filter(|(_, limit)| *limit > 0)

0 commit comments

Comments
 (0)