Validators work (RIPD-703):

This replaces the experimental validators module with foundational
code to implement a new system for tracking validators, validations and
the UNL. The code is turned off by default, in BeastConfig.h

* Remove obsolete public Manager interfaces
* Remove obsolete database methods
* Remove obsolete ChosenList concept
* Remove obsolete code
* Add missing includes
* Tidy up STValidation.h
* Move factory function to Validators::make_Manager
* Add Connection object for tracking STValidations
This commit is contained in:
Vinnie Falco
2014-11-18 15:43:33 -08:00
parent 628e3ac1eb
commit 2f6af906f4
38 changed files with 666 additions and 3040 deletions

View File

@@ -62,6 +62,7 @@ PeerImp::PeerImp (id_t id, endpoint_type remote_endpoint,
, usage_(consumer)
, slot_ (slot)
, http_message_(std::move(request))
, validatorsConnection_(getApp().getValidators().newConnection(id))
{
}
@@ -1784,15 +1785,9 @@ PeerImp::checkValidation (Job&, STValidation::pointer val,
return;
}
//----------------------------------------------------------------------
{
STValidation const& sv (*val);
Validators::ReceivedValidation rv;
rv.ledgerHash = sv.getLedgerHash ();
rv.publicKey = sv.getSignerPublic();
getApp ().getValidators ().on_receive_validation (rv);
}
//----------------------------------------------------------------------
#if RIPPLE_HOOK_VALIDATORS
validatorsConnection_->onValidation(*val);
#endif
std::set<Peer::id_t> peers;
if (getApp().getOPs ().recvValidation (val, std::to_string(id())) &&