mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refactor consensus for simulation (RIPD-1011):
This is a substantial refactor of the consensus code and also introduces a basic consensus simulation and testing framework. The new generic/templated version is in src/ripple/consensus and documents the current type requirements. The version adapted for the RCL is in src/ripple/app/consensus. The testing framework is in src/test/csf. Minor behavioral changes/fixes include: * Adjust close time offset even when not validating. * Remove spurious proposing_ = false call at end of handleLCL. * Remove unused functionality provided by checkLastValidation. * Separate open and converge time * Don't send a bow out if we're not proposing * Prevent consensus stopping if NetworkOPs switches to disconnect mode while consensus accepts a ledger * Prevent a corner case in which Consensus::gotTxSet or Consensus::peerProposal has the potential to update internal state while an dispatched accept job is running. * Distinguish external and internal calls to startNewRound. Only external calls can reset the proposing_ state of consensus
This commit is contained in:
@@ -828,6 +828,8 @@ LedgerMaster::consensusBuilt(
|
||||
if (standalone_)
|
||||
return;
|
||||
|
||||
mLedgerHistory.builtLedger (ledger, std::move (consensus));
|
||||
|
||||
if (ledger->info().seq <= mValidLedgerSeq)
|
||||
{
|
||||
auto stream = app_.journal ("LedgerConsensus").info();
|
||||
@@ -912,8 +914,6 @@ LedgerMaster::consensusBuilt(
|
||||
<< "Consensus triggered check of ledger";
|
||||
checkAccept (maxLedger, maxSeq);
|
||||
}
|
||||
|
||||
mLedgerHistory.builtLedger (ledger, std::move (consensus));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user