Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
note
  • Loading branch information
dharjeezy committed Oct 25, 2022
commit 86c40c64eaee2ff2076f25708705ba8d0ce347e6
7 changes: 4 additions & 3 deletions client/beefy/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ use crate::{
BeefyVoterLinks, Client, KnownPeers,
};

/// Depicts the bound for the number of pending votes
const MAX_PENDING_VOTES: u32 = 10;
const MAX_JUSTIFICATIONS: u32 = 10;
/// Depicts the bound for the number of pending justifications
const MAX_PENDING_JUSTIFICATIONS: u32 = 10;

enum RoundAction {
Drop,
Expand Down Expand Up @@ -249,7 +251,7 @@ pub(crate) struct BeefyWorker<B: Block, BE, C, P, R, N> {
>,
/// Buffer holding justifications for future processing.
pending_justifications:
BoundedBTreeMap<NumberFor<B>, BeefyVersionedFinalityProof<B>, ConstU32<MAX_JUSTIFICATIONS>>,
BoundedBTreeMap<NumberFor<B>, BeefyVersionedFinalityProof<B>, ConstU32<MAX_PENDING_JUSTIFICATIONS>>,
/// Chooses which incoming votes to accept and which votes to generate.
voting_oracle: VoterOracle<B>,
}
Expand Down Expand Up @@ -1044,7 +1046,6 @@ pub(crate) mod tests {
peer: &BeefyPeer,
key: &Keyring,
min_block_delta: u32,
max_pending_votes: u32,
) -> BeefyWorker<
Block,
Backend,
Expand Down