mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
For now, detect clocks out of sync and disallow connection.
Improve speed of ledger synchronization by compressing all three base queries into one.
This commit is contained in:
@@ -388,7 +388,7 @@ bool NetworkOPs::checkLastClosedLedger(const std::vector<Peer::pointer>& peerLis
|
||||
else if ((*it)->isConnected())
|
||||
{
|
||||
uint256 peerLedger = (*it)->getClosedLedgerHash();
|
||||
if (!!peerLedger)
|
||||
if (peerLedger.isNonZero())
|
||||
{
|
||||
ValidationCount& vc = ledgers[peerLedger];
|
||||
if ((vc.nodesUsing == 0) || ((*it)->getNodePublic() > vc.highNode))
|
||||
@@ -513,7 +513,8 @@ int NetworkOPs::beginConsensus(const uint256& networkClosed, Ledger::pointer clo
|
||||
assert(closingLedger->getParentHash() == mLedgerMaster->getClosedLedger()->getHash());
|
||||
|
||||
// Create a consensus object to get consensus on this ledger
|
||||
if (!!mConsensus) mConsensus->abort();
|
||||
if (!!mConsensus)
|
||||
mConsensus->abort();
|
||||
prevLedger->setImmutable();
|
||||
mConsensus = boost::make_shared<LedgerConsensus>(
|
||||
networkClosed,
|
||||
|
||||
Reference in New Issue
Block a user