mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Some proposal cleanups.
This commit is contained in:
@@ -616,7 +616,7 @@ bool NetworkOPs::recvPropose(uint32 proposeSeq, const uint256& proposeHash, uint
|
||||
if (!theApp->isNew(s.getSHA512Half()))
|
||||
return false;
|
||||
|
||||
NewcoinAddress naPeerPublic = NewcoinAddress::createNodePublic(strCopy(pubKey));
|
||||
NewcoinAddress naPeerPublic = NewcoinAddress::createNodePublic(pubKey);
|
||||
|
||||
if ((!mConsensus) && (mMode == omFULL))
|
||||
{
|
||||
@@ -632,7 +632,14 @@ bool NetworkOPs::recvPropose(uint32 proposeSeq, const uint256& proposeHash, uint
|
||||
if (!mConsensus)
|
||||
{
|
||||
Log(lsINFO) << "Received proposal outside consensus window";
|
||||
return (mMode != omFULL);
|
||||
return mMode != omFULL;
|
||||
}
|
||||
|
||||
// Is this node on our UNL?
|
||||
if (!theApp->getUNL().nodeInUNL(naPeerPublic))
|
||||
{
|
||||
Log(lsINFO) << "Untrusted proposal: " << naPeerPublic.humanNodePublic() << " " << proposeHash.GetHex();
|
||||
return true;
|
||||
}
|
||||
|
||||
LedgerProposal::pointer proposal =
|
||||
@@ -640,22 +647,11 @@ bool NetworkOPs::recvPropose(uint32 proposeSeq, const uint256& proposeHash, uint
|
||||
if (!proposal->checkSign(signature))
|
||||
{ // Note that if the LCL is different, the signature check will fail
|
||||
Log(lsWARNING) << "Ledger proposal fails signature check";
|
||||
if ((mMode != omFULL) && (mMode != omTRACKING) && theApp->getUNL().nodeInUNL(proposal->peekPublic()))
|
||||
{
|
||||
proposal->setSignature(signature);
|
||||
mConsensus->deferProposal(proposal, nodePublic);
|
||||
}
|
||||
proposal->setSignature(signature);
|
||||
mConsensus->deferProposal(proposal, nodePublic);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Is this node on our UNL?
|
||||
if (!theApp->getUNL().nodeInUNL(proposal->peekPublic()))
|
||||
{
|
||||
Log(lsINFO) << "Untrusted proposal: " << naPeerPublic.humanNodePublic() << " " <<
|
||||
proposal->getCurrentHash().GetHex();
|
||||
return true;
|
||||
}
|
||||
|
||||
return mConsensus->peerPosition(proposal);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user