How many of the participants must agree to reach a given threshold?
int participantsNeeded( int participants, int percent);
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.
Name |
Description |
---|---|
|
The number of participants (i.e. validators) |
|
The percent that we want to reach |
the number of participants which must agree
#include <ripple/consensus/Consensus.h>