|
xrpld
|
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 23 of file TrustGraph.h.
|
private |
Definition at line 25 of file TrustGraph.h.
|
default |
Create an empty trust graph.
| Graph const & xrpl::test::csf::TrustGraph< Peer >::graph | ( | ) |
Definition at line 35 of file TrustGraph.h.
| void xrpl::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 50 of file TrustGraph.h.
| void xrpl::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 64 of file TrustGraph.h.
|
nodiscard |
Definition at line 71 of file TrustGraph.h.
|
nodiscard |
Range over trusted peers.
| a | The node granting trust |
Definition at line 83 of file TrustGraph.h.
|
nodiscard |
Definition at line 100 of file TrustGraph.h.
|
nodiscard |
Check whether this trust graph satisfies the whitepaper no-forking condition.
Definition at line 142 of file TrustGraph.h.
|
private |
Definition at line 27 of file TrustGraph.h.