|
rippled
|
#include <STValidation.h>


Public Types | |
| using | iterator = boost::transform_iterator< Transform, STObject::list_type::const_iterator > |
Public Member Functions | |
| template<class LookupNodeID > | |
| STValidation (SerialIter &sit, LookupNodeID &&lookupNodeID, bool checkSignature) | |
| Construct a STValidation from a peer from serialized data. More... | |
| template<typename F > | |
| STValidation (NetClock::time_point signTime, PublicKey const &pk, SecretKey const &sk, NodeID const &nodeID, F &&f) | |
| Construct, sign and trust a new STValidation issued by this node. More... | |
| uint256 | getLedgerHash () const |
| uint256 | getConsensusHash () const |
| NetClock::time_point | getSignTime () const |
| NetClock::time_point | getSeenTime () const noexcept |
| PublicKey const & | getSignerPublic () const noexcept |
| NodeID const & | getNodeID () const noexcept |
| bool | isValid () const noexcept |
| bool | isFull () const noexcept |
| bool | isTrusted () const noexcept |
| uint256 | getSigningHash () const |
| void | setTrusted () |
| void | setUntrusted () |
| void | setSeen (NetClock::time_point s) |
| Blob | getSerialized () const |
| Blob | getSignature () const |
| std::string | render () const |
| iterator | begin () const |
| iterator | end () const |
| bool | empty () const |
| void | reserve (std::size_t n) |
| void | applyTemplate (SOTemplate const &type) |
| void | applyTemplateFromSField (SField const &) |
| bool | isFree () const |
| void | set (SOTemplate const &) |
| bool | set (SerialIter &u, int depth=0) |
| void | set (std::unique_ptr< STBase > v) |
| Set a field. More... | |
| void | set (STBase &&v) |
| SerializedTypeID | getSType () const override |
| bool | isEquivalent (STBase const &t) const override |
| bool | isDefault () const override |
| void | add (Serializer &s) const override |
| std::string | getFullText () const override |
| std::string | getText () const override |
| Json::Value | getJson (JsonOptions=JsonOptions::none) const override |
| void | addWithoutSigningFields (Serializer &s) const |
| Serializer | getSerializer () const |
| template<class... Args> | |
| std::size_t | emplace_back (Args &&... args) |
| int | getCount () const |
| bool | setFlag (std::uint32_t) |
| bool | clearFlag (std::uint32_t) |
| bool | isFlag (std::uint32_t) const |
| std::uint32_t | getFlags () const |
| uint256 | getHash (HashPrefix prefix) const |
| uint256 | getSigningHash (HashPrefix prefix) const |
| STBase const & | peekAtIndex (int offset) const |
| STBase & | getIndex (int offset) |
| STBase const * | peekAtPIndex (int offset) const |
| STBase * | getPIndex (int offset) |
| int | getFieldIndex (SField const &field) const |
| SField const & | getFieldSType (int index) const |
| STBase const & | peekAtField (SField const &field) const |
| STBase & | getField (SField const &field) |
| STBase const * | peekAtPField (SField const &field) const |
| STBase * | getPField (SField const &field, bool createOkay=false) |
| unsigned char | getFieldU8 (SField const &field) const |
| std::uint16_t | getFieldU16 (SField const &field) const |
| std::uint32_t | getFieldU32 (SField const &field) const |
| std::uint64_t | getFieldU64 (SField const &field) const |
| uint128 | getFieldH128 (SField const &field) const |
| uint160 | getFieldH160 (SField const &field) const |
| uint192 | getFieldH192 (SField const &field) const |
| uint256 | getFieldH256 (SField const &field) const |
| AccountID | getAccountID (SField const &field) const |
| Blob | getFieldVL (SField const &field) const |
| STAmount const & | getFieldAmount (SField const &field) const |
| STPathSet const & | getFieldPathSet (SField const &field) const |
| STVector256 const & | getFieldV256 (SField const &field) const |
| STArray const & | getFieldArray (SField const &field) const |
| STCurrency const & | getFieldCurrency (SField const &field) const |
| STNumber const & | getFieldNumber (SField const &field) const |
| template<class T > | |
| T::value_type | operator[] (TypedField< T > const &f) const |
| Get the value of a field. More... | |
| template<class T > | |
| std::optional< std::decay_t< typename T::value_type > > | operator[] (OptionaledField< T > const &of) const |
| Get the value of a field as a std::optional. More... | |
| template<class T > | |
| ValueProxy< T > | operator[] (TypedField< T > const &f) |
| Get a modifiable field value. More... | |
| template<class T > | |
| OptionalProxy< T > | operator[] (OptionaledField< T > const &of) |
| Return a modifiable field value as std::optional. More... | |
| template<class T > | |
| auto | operator[] (TypedField< T > const &f) -> ValueProxy< T > |
| template<class T > | |
| auto | operator[] (OptionaledField< T > const &of) -> OptionalProxy< T > |
| template<class T > | |
| T::value_type | at (TypedField< T > const &f) const |
| Get the value of a field. More... | |
| template<class T > | |
| std::optional< std::decay_t< typename T::value_type > > | at (OptionaledField< T > const &of) const |
| Get the value of a field as std::optional. More... | |
| template<class T > | |
| ValueProxy< T > | at (TypedField< T > const &f) |
| Get a modifiable field value. More... | |
| template<class T > | |
| OptionalProxy< T > | at (OptionaledField< T > const &of) |
| Return a modifiable field value as std::optional. More... | |
| template<class T > | |
| auto | at (TypedField< T > const &f) -> ValueProxy< T > |
| template<class T > | |
| auto | at (OptionaledField< T > const &of) -> OptionalProxy< T > |
| void | setFieldU8 (SField const &field, unsigned char) |
| void | setFieldU16 (SField const &field, std::uint16_t) |
| void | setFieldU32 (SField const &field, std::uint32_t) |
| void | setFieldU64 (SField const &field, std::uint64_t) |
| void | setFieldH128 (SField const &field, uint128 const &) |
| void | setFieldH256 (SField const &field, uint256 const &) |
| void | setFieldVL (SField const &field, Blob const &) |
| void | setFieldVL (SField const &field, Slice const &) |
| void | setAccountID (SField const &field, AccountID const &) |
| void | setFieldAmount (SField const &field, STAmount const &) |
| void | setFieldIssue (SField const &field, STIssue const &) |
| void | setFieldCurrency (SField const &field, STCurrency const &) |
| void | setFieldNumber (SField const &field, STNumber const &) |
| void | setFieldPathSet (SField const &field, STPathSet const &) |
| void | setFieldV256 (SField const &field, STVector256 const &v) |
| void | setFieldArray (SField const &field, STArray const &v) |
| template<class Tag > | |
| void | setFieldH160 (SField const &field, base_uint< 160, Tag > const &v) |
| STObject & | peekFieldObject (SField const &field) |
| STArray & | peekFieldArray (SField const &field) |
| bool | isFieldPresent (SField const &field) const |
| STBase * | makeFieldPresent (SField const &field) |
| void | makeFieldAbsent (SField const &field) |
| bool | delField (SField const &field) |
| void | delField (int index) |
| bool | hasMatchingEntry (STBase const &) |
| bool | operator== (STObject const &o) const |
| bool | operator== (STBase const &t) const |
| bool | operator!= (STObject const &o) const |
| bool | operator!= (STBase const &t) const |
| template<typename T , typename V > | |
| V | getFieldByValue (SField const &field) const |
| template<typename T , typename V > | |
| V const & | getFieldByConstRef (SField const &field, V const &empty) const |
| template<class D > | |
| D & | downcast () |
| template<class D > | |
| D const & | downcast () const |
| template<class D > | |
| D const & | downcast () const |
| void | setFName (SField const &n) |
| A STBase is a field. More... | |
| SField const & | getFName () const |
| void | addFieldID (Serializer &s) const |
Static Public Member Functions | |
| static STObject | makeInnerObject (SField const &name) |
Static Protected Member Functions | |
| template<class T > | |
| static STBase * | emplace (std::size_t n, void *buf, T &&val) |
Private Types | |
| enum | WhichFields : bool { omitSigningFields = false , withAllFields = true } |
| using | list_type = std::vector< detail::STVar > |
Private Member Functions | |
| STBase * | copy (std::size_t n, void *buf) const override |
| STBase * | move (std::size_t n, void *buf) override |
| void | add (Serializer &s, WhichFields whichFields) const |
| template<typename T , typename V = typename std::remove_cv<typename std::remove_reference< decltype(std::declval<T>().value())>::type, ::type > | |
| V | getFieldByValue (SField const &field) const |
| template<typename T , typename V > | |
| V const & | getFieldByConstRef (SField const &field, V const &empty) const |
| template<typename T , typename V > | |
| void | setFieldUsingSetValue (SField const &field, V value) |
| template<typename T > | |
| void | setFieldUsingAssignment (SField const &field, T const &value) |
| template<typename T > | |
| T & | peekField (SField const &field) |
Static Private Member Functions | |
| static SOTemplate const & | validationFormat () |
| static std::vector< STBase const * > | getSortedFields (STObject const &objToSort, WhichFields whichFields) |
| static auto & | getCounter () noexcept |
Private Attributes | |
| bool | mTrusted = false |
| std::optional< bool > | valid_ |
| PublicKey const | signingPubKey_ |
| NodeID const | nodeID_ |
| NetClock::time_point | seenTime_ = {} |
| list_type | v_ |
| SOTemplate const * | mType |
| SField const * | fName |
Friends | |
| class | detail::STVar |
Definition at line 46 of file STValidation.h.
|
privateinherited |
Definition at line 77 of file STObject.h.
|
inherited |
Definition at line 83 of file STObject.h.
|
privateinherited |
| Enumerator | |
|---|---|
| omitSigningFields | |
| withAllFields | |
Definition at line 421 of file STObject.h.
| ripple::STValidation::STValidation | ( | SerialIter & | sit, |
| LookupNodeID && | lookupNodeID, | ||
| bool | checkSignature | ||
| ) |
Construct a STValidation from a peer from serialized data.
| sit | Iterator over serialized data |
| lookupNodeID | Invocable with signature NodeID(PublicKey const&) used to find the Node ID based on the public key that signed the validation. For manifest based validators, this should be the NodeID of the master public key. |
| checkSignature | Whether to verify the data was signed properly |
Definition at line 175 of file STValidation.h.
| ripple::STValidation::STValidation | ( | NetClock::time_point | signTime, |
| PublicKey const & | pk, | ||
| SecretKey const & | sk, | ||
| NodeID const & | nodeID, | ||
| F && | f | ||
| ) |
Construct, sign and trust a new STValidation issued by this node.
| signTime | When the validation is signed |
| publicKey | The current signing public key |
| secretKey | The current signing secret key |
| nodeID | ID corresponding to node's public master key |
| f | callback function to "fill" the validation with necessary data |
Definition at line 211 of file STValidation.h.
| uint256 ripple::STValidation::getLedgerHash | ( | ) | const |
Definition at line 94 of file STValidation.cpp.
| uint256 ripple::STValidation::getConsensusHash | ( | ) | const |
Definition at line 100 of file STValidation.cpp.
| NetClock::time_point ripple::STValidation::getSignTime | ( | ) | const |
Definition at line 106 of file STValidation.cpp.
|
noexcept |
Definition at line 112 of file STValidation.cpp.
|
noexcept |
Definition at line 256 of file STValidation.h.
|
noexcept |
Definition at line 262 of file STValidation.h.
|
noexcept |
Definition at line 118 of file STValidation.cpp.
|
noexcept |
Definition at line 137 of file STValidation.cpp.
|
noexcept |
Definition at line 268 of file STValidation.h.
| uint256 ripple::STValidation::getSigningHash | ( | ) | const |
Definition at line 88 of file STValidation.cpp.
| void ripple::STValidation::setTrusted | ( | ) |
Definition at line 274 of file STValidation.h.
| void ripple::STValidation::setUntrusted | ( | ) |
Definition at line 280 of file STValidation.h.
| void ripple::STValidation::setSeen | ( | NetClock::time_point | s | ) |
Definition at line 286 of file STValidation.h.
| Blob ripple::STValidation::getSerialized | ( | ) | const |
Definition at line 149 of file STValidation.cpp.
| Blob ripple::STValidation::getSignature | ( | ) | const |
Definition at line 143 of file STValidation.cpp.
| std::string ripple::STValidation::render | ( | ) | const |
Definition at line 147 of file STValidation.h.
|
staticprivate |
Definition at line 53 of file STValidation.cpp.
|
overrideprivatevirtual |
Reimplemented from ripple::STObject.
Definition at line 41 of file STValidation.cpp.
|
overrideprivatevirtual |
Reimplemented from ripple::STObject.
Definition at line 47 of file STValidation.cpp.
Definition at line 95 of file STObject.cpp.
|
inherited |
Definition at line 924 of file STObject.h.
|
inherited |
Definition at line 930 of file STObject.h.
|
inherited |
Definition at line 936 of file STObject.h.
|
inherited |
Definition at line 942 of file STObject.h.
|
inherited |
Definition at line 172 of file STObject.cpp.
|
inherited |
Definition at line 226 of file STObject.cpp.
|
inherited |
Definition at line 948 of file STObject.h.
|
inherited |
Definition at line 156 of file STObject.cpp.
|
inherited |
Definition at line 236 of file STObject.cpp.
|
inherited |
Set a field.
if the field already exists, it is replaced.
Definition at line 707 of file STObject.cpp.
|
inherited |
Definition at line 713 of file STObject.cpp.
|
overridevirtualinherited |
Reimplemented from ripple::STBase.
Reimplemented in ripple::STTx.
Definition at line 129 of file STObject.cpp.
|
overridevirtualinherited |
Reimplemented from ripple::STBase.
Definition at line 360 of file STObject.cpp.
|
overridevirtualinherited |
Reimplemented from ripple::STBase.
Definition at line 135 of file STObject.cpp.
|
overridevirtualinherited |
Reimplemented from ripple::STBase.
Definition at line 141 of file STObject.cpp.
|
privateinherited |
Definition at line 881 of file STObject.cpp.
|
overridevirtualinherited |
Reimplemented from ripple::STBase.
Reimplemented in ripple::STTx.
Definition at line 310 of file STObject.cpp.
|
overridevirtualinherited |
Reimplemented from ripple::STBase.
Definition at line 341 of file STObject.cpp.
|
overridevirtualinherited |
Reimplemented from ripple::STBase.
Reimplemented in ripple::STTx.
Definition at line 825 of file STObject.cpp.
|
inherited |
Definition at line 954 of file STObject.h.
|
inherited |
Definition at line 963 of file STObject.h.
|
inherited |
Definition at line 972 of file STObject.h.
|
inherited |
Definition at line 979 of file STObject.h.
|
inherited |
Definition at line 507 of file STObject.cpp.
|
inherited |
Definition at line 519 of file STObject.cpp.
|
inherited |
Definition at line 531 of file STObject.cpp.
|
inherited |
Definition at line 537 of file STObject.cpp.
|
inherited |
Definition at line 395 of file STObject.cpp.
|
inherited |
Definition at line 404 of file STObject.cpp.
|
inherited |
Definition at line 985 of file STObject.h.
|
inherited |
Definition at line 991 of file STObject.h.
|
inherited |
Definition at line 997 of file STObject.h.
|
inherited |
Definition at line 1003 of file STObject.h.
|
inherited |
Definition at line 413 of file STObject.cpp.
|
inherited |
Definition at line 451 of file STObject.cpp.
Definition at line 429 of file STObject.cpp.
Definition at line 440 of file STObject.cpp.
Definition at line 457 of file STObject.cpp.
Definition at line 468 of file STObject.cpp.
|
inherited |
Definition at line 603 of file STObject.cpp.
|
inherited |
Definition at line 609 of file STObject.cpp.
|
inherited |
Definition at line 615 of file STObject.cpp.
|
inherited |
Definition at line 621 of file STObject.cpp.
Definition at line 627 of file STObject.cpp.
Definition at line 633 of file STObject.cpp.
Definition at line 639 of file STObject.cpp.
Definition at line 645 of file STObject.cpp.
Definition at line 651 of file STObject.cpp.
Definition at line 657 of file STObject.cpp.
Definition at line 665 of file STObject.cpp.
Definition at line 672 of file STObject.cpp.
|
inherited |
Definition at line 679 of file STObject.cpp.
Definition at line 686 of file STObject.cpp.
|
inherited |
Definition at line 693 of file STObject.cpp.
Definition at line 700 of file STObject.cpp.
|
inherited |
Get the value of a field.
| A | TypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed. |
| STObject::FieldErr | if the field is not present. |
Definition at line 1010 of file STObject.h.
|
inherited |
Get the value of a field as a std::optional.
| An | OptionaledField built from an SField value representing the desired object field. In typical use, the OptionaledField will be constructed by using the ~ operator on an SField. |
Definition at line 1017 of file STObject.h.
|
inherited |
Get a modifiable field value.
| A | TypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed. |
| STObject::FieldErr | if the field is not present. |
|
inherited |
Return a modifiable field value as std::optional.
| An | OptionaledField built from an SField value representing the desired object field. In typical use, the OptionaledField will be constructed by using the ~ operator on an SField. |
optional holding a modifiable reference to the value of the specified field. Returns std::nullopt if the field is not present.
|
inherited |
Definition at line 1024 of file STObject.h.
|
inherited |
Definition at line 1031 of file STObject.h.
|
inherited |
Get the value of a field.
| A | TypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed. |
| STObject::FieldErr | if the field is not present. |
Definition at line 1038 of file STObject.h.
|
inherited |
Get the value of a field as std::optional.
| An | OptionaledField built from an SField value representing the desired object field. In typical use, the OptionaledField will be constructed by using the ~ operator on an SField. |
Definition at line 1071 of file STObject.h.
|
inherited |
Get a modifiable field value.
| A | TypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed. |
| STObject::FieldErr | if the field is not present. |
|
inherited |
Return a modifiable field value as std::optional.
| An | OptionaledField built from an SField value representing the desired object field. In typical use, the OptionaledField will be constructed by using the ~ operator on an SField. |
optional holding a modifiable reference to the value of the specified field. Returns std::nullopt if the field is not present.
|
inherited |
Definition at line 1099 of file STObject.h.
|
inherited |
Definition at line 1106 of file STObject.h.
|
inherited |
Definition at line 729 of file STObject.cpp.
|
inherited |
Definition at line 735 of file STObject.cpp.
|
inherited |
Definition at line 741 of file STObject.cpp.
|
inherited |
Definition at line 747 of file STObject.cpp.
Definition at line 753 of file STObject.cpp.
Definition at line 759 of file STObject.cpp.
Definition at line 777 of file STObject.cpp.
Definition at line 783 of file STObject.cpp.
Definition at line 771 of file STObject.cpp.
Definition at line 789 of file STObject.cpp.
Definition at line 801 of file STObject.cpp.
|
inherited |
Definition at line 795 of file STObject.cpp.
Definition at line 807 of file STObject.cpp.
Definition at line 813 of file STObject.cpp.
|
inherited |
Definition at line 765 of file STObject.cpp.
Definition at line 819 of file STObject.cpp.
|
inherited |
Definition at line 1113 of file STObject.h.
Definition at line 495 of file STObject.cpp.
Definition at line 501 of file STObject.cpp.
|
inherited |
Definition at line 484 of file STObject.cpp.
Definition at line 548 of file STObject.cpp.
|
inherited |
Definition at line 570 of file STObject.cpp.
|
inherited |
Definition at line 585 of file STObject.cpp.
|
inherited |
Definition at line 597 of file STObject.cpp.
|
inherited |
Definition at line 299 of file STObject.cpp.
|
inherited |
Definition at line 838 of file STObject.cpp.
|
inherited |
Definition at line 51 of file STBase.cpp.
|
inherited |
Definition at line 1131 of file STObject.h.
|
inherited |
Definition at line 57 of file STBase.cpp.
|
staticprivateinherited |
Definition at line 907 of file STObject.cpp.
|
privateinherited |
|
inherited |
Definition at line 1138 of file STObject.h.
|
privateinherited |
|
inherited |
Definition at line 1165 of file STObject.h.
|
privateinherited |
Definition at line 1188 of file STObject.h.
|
privateinherited |
Definition at line 1211 of file STObject.h.
|
privateinherited |
Definition at line 1232 of file STObject.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 141 of file STBase.cpp.
|
inherited |
Definition at line 147 of file STBase.cpp.
|
staticprotectedinherited |
|
staticprivatenoexceptinherited |
Definition at line 129 of file CountedObject.h.
|
friend |
Definition at line 171 of file STValidation.h.
|
private |
Definition at line 48 of file STValidation.h.
|
mutableprivate |
Definition at line 52 of file STValidation.h.
|
private |
Definition at line 55 of file STValidation.h.
|
private |
Definition at line 59 of file STValidation.h.
|
private |
Definition at line 61 of file STValidation.h.
|
privateinherited |
Definition at line 79 of file STObject.h.
|
privateinherited |
Definition at line 80 of file STObject.h.