| 
    rippled
    
   | 
 
Trust graph. More...
#include <TrustGraph.h>

Classes | |
| struct | ForkInfo | 
| An example of nodes that fail the whitepaper no-forking condition.  More... | |
Public Member Functions | |
| TrustGraph ()=default | |
| Create an empty trust graph.   | |
| Graph const & | graph () | 
| void | trust (Peer const &from, Peer const &to) | 
| Create trust.   | |
| void | untrust (Peer const &from, Peer const &to) | 
| Remove trust.   | |
| bool | trusts (Peer const &from, Peer const &to) const | 
| auto | trustedPeers (Peer const &a) const | 
| Range over trusted peers.   | |
| std::vector< ForkInfo > | forkablePairs (double quorum) const | 
| bool | canFork (double quorum) const | 
| Check whether this trust graph satisfies the whitepaper no-forking condition.   | |
Private Types | |
| using | Graph = Digraph< Peer > | 
Private Attributes | |
| Graph | graph_ | 
Trust graph.
Trust is a directed relationship from a node i to node j. If node i trusts node j, then node i has node j in its UNL. This class wraps a digraph representing the trust relationships for all peers in the simulation.
Definition at line 25 of file TrustGraph.h.
      
  | 
  private | 
Definition at line 27 of file TrustGraph.h.
      
  | 
  default | 
Create an empty trust graph.
| Graph const & ripple::test::csf::TrustGraph< Peer >::graph | ( | ) | 
Definition at line 37 of file TrustGraph.h.
| void ripple::test::csf::TrustGraph< Peer >::trust | ( | Peer const & | from, | 
| Peer const & | to | ||
| ) | 
Create trust.
Establish trust between Peer from and Peer to; as if from put to in its UNL.
| from | The peer granting trust | 
| to | The peer receiving trust | 
Definition at line 52 of file TrustGraph.h.
| void ripple::test::csf::TrustGraph< Peer >::untrust | ( | Peer const & | from, | 
| Peer const & | to | ||
| ) | 
Remove trust.
Revoke trust from Peer from to Peer to; as if from removed to from its UNL.
| from | The peer revoking trust | 
| to | The peer being revoked | 
Definition at line 66 of file TrustGraph.h.
| bool ripple::test::csf::TrustGraph< Peer >::trusts | ( | Peer const & | from, | 
| Peer const & | to | ||
| ) | const | 
Definition at line 73 of file TrustGraph.h.
| auto ripple::test::csf::TrustGraph< Peer >::trustedPeers | ( | Peer const & | a | ) | const | 
Range over trusted peers.
| a | The node granting trust | 
a trusts, i.e. the nodes in its UNL Definition at line 85 of file TrustGraph.h.
| std::vector< ForkInfo > ripple::test::csf::TrustGraph< Peer >::forkablePairs | ( | double | quorum | ) | const | 
Definition at line 102 of file TrustGraph.h.
| bool ripple::test::csf::TrustGraph< Peer >::canFork | ( | double | quorum | ) | const | 
Check whether this trust graph satisfies the whitepaper no-forking condition.
Definition at line 149 of file TrustGraph.h.
      
  | 
  private | 
Definition at line 29 of file TrustGraph.h.