这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Conversation

@sagar-solana
Copy link
Contributor

Problem

Requiring a closure to filter out elements makes bank::vote_accounts and accounts::get_vote_accounts unnecessarily complicated. Instead returning an iterator allows for much more flexibility.

Summary of Changes

Refactored the two fns mentioned above, and cleaned up leader_confirmation_service::get_last_supermajority_timestamp

@sagar-solana
Copy link
Contributor Author

@carllin, thanks for simplifying this.

impl LeaderConfirmationService {
fn get_last_supermajority_timestamp(
bank: &Arc<Bank>,
leader_id: Pubkey,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there no test for this "exclude the leader from our calculation" case that's broken by this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh there is a test apparently. Something failed. I'll get to it later tonight. Afk now :)

@rob-solana
Copy link
Contributor

this is better ;)

@codecov
Copy link

codecov bot commented Mar 2, 2019

Codecov Report

Merging #3052 into master will increase coverage by 1.3%.
The diff coverage is 100%.

@@           Coverage Diff            @@
##           master   #3052     +/-   ##
========================================
+ Coverage    76.5%   77.8%   +1.3%     
========================================
  Files         133     133             
  Lines       20653   20288    -365     
========================================
- Hits        15801   15795      -6     
+ Misses       4852    4493    -359

@sagar-solana sagar-solana merged commit c89ba1c into solana-labs:master Mar 2, 2019
@sagar-solana sagar-solana deleted the bugfix_leader_conf branch March 2, 2019 21:23
mvines pushed a commit that referenced this pull request Mar 3, 2019
AshwinSekar pushed a commit to AshwinSekar/solana that referenced this pull request Oct 2, 2024
willhickey added a commit that referenced this pull request Oct 4, 2024
…3052) (#3062)

* ci: ignore the tonic audit as a temporary stopgap (#3052)

(cherry picked from commit 9b5525d)

# Conflicts:
#	ci/do-audit.sh

* Fix conflicts

* Update to mimic v2.0 change

---------

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
Co-authored-by: WillHickey <will.hickey@anza.xyz>
behzadnouri pushed a commit to behzadnouri/solana that referenced this pull request Oct 10, 2024
…olana-labs#3052) (solana-labs#3062)

* ci: ignore the tonic audit as a temporary stopgap (solana-labs#3052)

(cherry picked from commit 9b5525d)

# Conflicts:
#	ci/do-audit.sh

* Fix conflicts

* Update to mimic v2.0 change

---------

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
Co-authored-by: WillHickey <will.hickey@anza.xyz>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants