mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix duplicate validation and manifest suppression
RIPD-1636 RIPD-1638 RIPD-1632
This commit is contained in:
@@ -724,11 +724,12 @@ PeerImp::doProtocolStart()
|
||||
|
||||
app_.validatorManifests ().for_each_manifest (
|
||||
[&tm](std::size_t s){tm.mutable_list()->Reserve(s);},
|
||||
[&tm](Manifest const& manifest)
|
||||
[&tm, &hr = app_.getHashRouter()](Manifest const& manifest)
|
||||
{
|
||||
auto const& s = manifest.serialized;
|
||||
auto& tm_e = *tm.add_list();
|
||||
tm_e.set_stobject(s.data(), s.size());
|
||||
hr.addSuppression(manifest.hash());
|
||||
});
|
||||
|
||||
if (tm.list_size() > 0)
|
||||
@@ -1311,13 +1312,6 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMProposeSet> const& m)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!app_.getValidationPublicKey().empty() &&
|
||||
publicKey == app_.getValidationPublicKey())
|
||||
{
|
||||
JLOG(p_journal_.trace()) << "Proposal: self";
|
||||
return;
|
||||
}
|
||||
|
||||
auto const isTrusted = app_.validators().trusted (publicKey);
|
||||
|
||||
if (!isTrusted)
|
||||
@@ -2046,7 +2040,9 @@ PeerImp::checkValidation (STValidation::pointer val,
|
||||
if (app_.getOPs ().recvValidation(val, std::to_string(id())) ||
|
||||
cluster())
|
||||
{
|
||||
overlay_.relay(*packet, signingHash);
|
||||
auto const suppression = sha512Half(
|
||||
makeSlice(val->getSerialized()));
|
||||
overlay_.relay(*packet, suppression);
|
||||
}
|
||||
}
|
||||
catch (std::exception const&)
|
||||
|
||||
Reference in New Issue
Block a user