mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Remove STValidation::isValid overload
This commit is contained in:
committed by
Nik Bougalis
parent
e03efdbe0b
commit
8d59ed5b2a
@@ -1917,13 +1917,10 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMValidation> const& m)
|
||||
app_.getJobQueue ().addJob (
|
||||
isTrusted ? jtVALIDATION_t : jtVALIDATION_ut,
|
||||
"recvValidation->checkValidation",
|
||||
[weak, val, isTrusted, m] (Job&)
|
||||
[weak, val, m] (Job&)
|
||||
{
|
||||
if (auto peer = weak.lock())
|
||||
peer->checkValidation(
|
||||
val,
|
||||
isTrusted,
|
||||
m);
|
||||
peer->checkValidation(val, m);
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -2248,13 +2245,12 @@ PeerImp::checkPropose (Job& job,
|
||||
|
||||
void
|
||||
PeerImp::checkValidation (STValidation::pointer val,
|
||||
bool isTrusted, std::shared_ptr<protocol::TMValidation> const& packet)
|
||||
std::shared_ptr<protocol::TMValidation> const& packet)
|
||||
{
|
||||
try
|
||||
{
|
||||
// VFALCO Which functions throw?
|
||||
uint256 signingHash = val->getSigningHash();
|
||||
if (! cluster() && !val->isValid (signingHash))
|
||||
if (! cluster() && !val->isValid())
|
||||
{
|
||||
JLOG(p_journal_.warn()) <<
|
||||
"Validation is invalid";
|
||||
|
||||
@@ -472,7 +472,7 @@ private:
|
||||
|
||||
void
|
||||
checkValidation (STValidation::pointer val,
|
||||
bool isTrusted, std::shared_ptr<protocol::TMValidation> const& packet);
|
||||
std::shared_ptr<protocol::TMValidation> const& packet);
|
||||
|
||||
void
|
||||
getLedger (std::shared_ptr<protocol::TMGetLedger> const&packet);
|
||||
|
||||
@@ -184,9 +184,6 @@ public:
|
||||
uint256
|
||||
getSigningHash() const;
|
||||
|
||||
bool
|
||||
isValid(uint256 const&) const;
|
||||
|
||||
void
|
||||
setTrusted()
|
||||
{
|
||||
|
||||
@@ -103,19 +103,13 @@ NetClock::time_point STValidation::getSeenTime () const
|
||||
}
|
||||
|
||||
bool STValidation::isValid () const
|
||||
{
|
||||
return isValid (getSigningHash ());
|
||||
}
|
||||
|
||||
bool STValidation::isValid (uint256 const& signingHash) const
|
||||
{
|
||||
try
|
||||
{
|
||||
if (publicKeyType(getSignerPublic()) != KeyType::secp256k1)
|
||||
return false;
|
||||
|
||||
return verifyDigest (getSignerPublic(),
|
||||
signingHash,
|
||||
return verifyDigest (getSignerPublic(), getSigningHash(),
|
||||
makeSlice(getFieldVL (sfSignature)),
|
||||
getFlags () & vfFullyCanonicalSig);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user