diff --git a/Peer.cpp b/Peer.cpp index 6c5072064..8f48dd86b 100644 --- a/Peer.cpp +++ b/Peer.cpp @@ -510,6 +510,8 @@ void Peer::recvGetLedger(newcoin::TMGetLedger& packet) void Peer::recvLedger(newcoin::TMLedgerData& packet) { + if(!theApp->getMasterLedgerAcquire().gotLedgerData(packet)) + punishPeer(PP_UNWANTED_DATA); } void Peer::sendHello() diff --git a/Peer.h b/Peer.h index f874bbd46..0ddda232b 100644 --- a/Peer.h +++ b/Peer.h @@ -16,6 +16,7 @@ enum PeerPunish { PP_INVALID_REQUEST=1, // The peer sent a request that makes no sense PP_UNKNOWN_REQUEST=2, // The peer sent a request that might be garbage + PP_UNWANTED_DATA=3, // The peer sent us data we didn't want/need }; class Peer : public boost::enable_shared_from_this