From cf724bbba725476190d486b34553ed075336e75e Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 22 Jul 2013 23:38:50 -0700 Subject: [PATCH] Don't check signatures on proposals from cluster peers. --- src/cpp/ripple/ripple_Peer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cpp/ripple/ripple_Peer.cpp b/src/cpp/ripple/ripple_Peer.cpp index d7bfe89478..227ab61324 100644 --- a/src/cpp/ripple/ripple_Peer.cpp +++ b/src/cpp/ripple/ripple_Peer.cpp @@ -1179,7 +1179,8 @@ void PeerImp::recvTransaction (protocol::TMTransaction& packet, ScopedLock& Mast // Called from our JobQueue static void checkPropose (Job& job, boost::shared_ptr packet, - LedgerProposal::pointer proposal, uint256 consensusLCL, RippleAddress nodePublic, boost::weak_ptr peer) + LedgerProposal::pointer proposal, uint256 consensusLCL, RippleAddress nodePublic, + boost::weak_ptr peer, bool fromCluster) { bool sigGood = false; bool isTrusted = (job.getType () == jtPROPOSAL_t); @@ -1197,7 +1198,7 @@ static void checkPropose (Job& job, boost::shared_ptr pa WriteLog (lsTRACE, Peer) << "proposal with previous ledger"; memcpy (prevLedger.begin (), set.previousledger ().data (), 256 / 8); - if (!proposal->checkSign (set.signature ())) + if (!fromCluster && !proposal->checkSign (set.signature ())) { Peer::pointer p = peer.lock (); WriteLog (lsWARNING, Peer) << "proposal with previous ledger fails signature check: " << @@ -1305,7 +1306,7 @@ void PeerImp::recvPropose (const boost::shared_ptr& pack getApp().getJobQueue ().addJob (isTrusted ? jtPROPOSAL_t : jtPROPOSAL_ut, "recvPropose->checkPropose", BIND_TYPE (&checkPropose, P_1, packet, proposal, consensusLCL, - mNodePublic, boost::weak_ptr (shared_from_this ()))); + mNodePublic, boost::weak_ptr (shared_from_this ()), mCluster)); } void PeerImp::recvHaveTxSet (protocol::TMHaveTransactionSet& packet)