PrevUpHomeNext

participantsNeeded

How many of the participants must agree to reach a given threshold?

Synopsis
int
participantsNeeded(
    int participants,
    int percent);
Description

Note that the number may not precisely yield the requested percentage. For example, with with size = 5 and percent = 70, we return 3, but 3 out of 5 works out to 60%. There are no security implications to this.

Parameters

Name

Description

participants

The number of participants (i.e. validators)

percent

The percent that we want to reach

Return Value

the number of participants which must agree

Header

#include <ripple/consensus/Consensus.h>


PrevUpHomeNext