Commit Graph

8 Commits

Author SHA1 Message Date
behzad nouri 4ec5ea6f7b
replaces assert!(matches!(...)) with assert_matches!(...) (#33068)
assert_matches!(...) provides more informative error message when it
fails and it is part of nightly rust:
https://doc.rust-lang.org/std/assert_matches/macro.assert_matches.html
2023-08-30 13:48:27 -04:00
steviez a4c8cc3ce0
Remove improper uses of &Arc<Bank> (#32802)
In most cases, either a &Bank or an Arc<Bank> is more proper.
- &Bank is used if the function only needs a momentary reference
- Arc<Bank> is used if the function needs its' own copy

This PR leaves several instances of &Arc<Bank> around; these instances
are situations where a clone may only happen conditionally.
2023-08-18 16:46:34 -05:00
Andrew Fitzgerald fad52dff34
DecisionMaker: Add more tests (#32505) 2023-07-21 14:10:00 -07:00
Andrew Fitzgerald 0b5421f5ca
Bugfix: would_be_leader_shortly_fn period set to 1 slot instead of 20 (#32468) 2023-07-12 16:54:40 -07:00
Andrew Fitzgerald c847236147
decision maker perf (#30618) 2023-04-12 21:40:59 -07:00
Andrew Fitzgerald b7e76c752f
Separate stats updates from decision_maker (#30481)
* Separate stats updates from decision_maker

* BufferedPacketsDecision::bank_start

* BufferedPacketsDecision: bank_start() doc-comment

* remove unnecessary clone
2023-03-15 19:39:48 -07:00
Andrew Fitzgerald c06053f505
BankingStage Refactor: Add state to DecisionMaker (#29806) 2023-02-01 09:18:40 -08:00
apfitzge 8c793da7d0
BankingStage Refactor: Move decision making functions to new module (#29788)
Move decision making functions to new module
2023-01-20 10:10:47 -08:00