Timing change to avoid allowing a server to race ahead of the

majority of validators. Enforce minimum ledger open time which
is extended if there are too few validations.
This commit is contained in:
JoelKatz
2013-04-15 09:50:23 -07:00
parent b7eccd1dce
commit 0bc9c0b737
3 changed files with 24 additions and 6 deletions

View File

@@ -16,6 +16,9 @@
// The number of milliseconds we wait minimum to ensure participation
# define LEDGER_MIN_CONSENSUS 2000
// The number of milliseconds we wait minimum to ensure others have computed the LCL
# define LEDGER_MIN_CLOSE 2000
// Initial resolution of ledger close time
# define LEDGER_TIME_ACCURACY 30
@@ -62,8 +65,8 @@ public:
// Call when a consensus is reached and when any transaction is relayed to be added
static bool shouldClose(
bool anyTransactions,
int previousProposers, int proposersClosed,
int previousSeconds, int currentSeconds,
int previousProposers, int proposersClosed, int proposerersValidated,
int previousMSeconds, int currentMSeconds, int openMSeconds,
int idleInterval);
static bool haveConsensus(