mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Consensus singleton and lock changes (RIPD-1054):
* Make LedgerConsensus object a singleton * Protect consensus structures with their own locks * Simplify NetworkOPs interaction with LedgerConsensus * Log when we build and validate the same ledger
This commit is contained in:
@@ -1917,13 +1917,7 @@ PeerImp::checkPropose (Job& job,
|
||||
}
|
||||
else
|
||||
{
|
||||
uint256 consensusLCL;
|
||||
{
|
||||
std::lock_guard<Application::MutexType> lock (app_.getMasterMutex());
|
||||
consensusLCL = app_.getOPs ().getConsensusLCL ();
|
||||
}
|
||||
|
||||
if (consensusLCL == proposal->getPrevLedger())
|
||||
if (app_.getOPs().getConsensusLCL() == proposal->getPrevLedger())
|
||||
{
|
||||
// relay untrusted proposal
|
||||
p_journal_.trace <<
|
||||
|
||||
Reference in New Issue
Block a user