Skip to content

refactor: replace peerID on proTxHash in peer-catchup-rounds map#559

Merged
shotonoff merged 1 commit intov0.10-devfrom
replace-peer-id-on-pro-tx-hash-for-peer-catch-up-round
Jan 20, 2023
Merged

refactor: replace peerID on proTxHash in peer-catchup-rounds map#559
shotonoff merged 1 commit intov0.10-devfrom
replace-peer-id-on-pro-tx-hash-for-peer-catch-up-round

Conversation

@shotonoff
Copy link
Collaborator

@shotonoff shotonoff commented Jan 20, 2023

Issue being fixed or feature implemented

peerID is used as a key in HeightVoteSet.peerCatchupRounds map
Since, vote has validatorProTxHash field, then we can use this value instead of peerID
This improvement allows us to remove second argument (peerID) from HeightVoteSet.AddVote method, and rely only on data in the vote

What was done?

  1. Use Vote.ValidatorProTxHash in a HeightVoteSet.peerCatchupRounds map
  2. Remove peerID form HeightVoteSet.AddVote
  3. Fix TestPeerCatchupRounds test

How Has This Been Tested?

Unit / E2E tests

Breaking Changes

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shotonoff shotonoff merged commit 558d83c into v0.10-dev Jan 20, 2023
@lklimek lklimek deleted the replace-peer-id-on-pro-tx-hash-for-peer-catch-up-round branch February 1, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants