20 #ifndef RIPPLE_PROTOCOL_STVALIDATION_H_INCLUDED
21 #define RIPPLE_PROTOCOL_STVALIDATION_H_INCLUDED
23 #include <ripple/basics/FeeUnits.h>
24 #include <ripple/basics/Log.h>
25 #include <ripple/protocol/PublicKey.h>
26 #include <ripple/protocol/STObject.h>
27 #include <ripple/protocol/SecretKey.h>
44 return "STValidation";
68 template <
class LookupNodeID>
71 LookupNodeID&& lookupNodeID,
80 <<
"Invalid public key in validation"
82 Throw<std::runtime_error> (
"Invalid public key in validation");
85 if (checkSignature && !
isValid ())
88 <<
"Invalid signature in validation"
90 Throw<std::runtime_error> (
"Invalid signature in validation");
149 return emplace(n, buf, std::move(*
this));
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
STBase * move(std::size_t n, void *buf) override
uint256 getConsensusHash() const
boost::optional< XRPAmount > reserveBase
Tracks the number of instances of an object.
boost::optional< KeyType > publicKeyType(Slice const &slice)
Returns the type of public key.
static char const * getCountedObjectName()
const SF_Blob sfSigningPubKey(access, STI_VL, 3, "SigningPubKey")
boost::optional< std::uint32_t > loadFee
STBase * copy(std::size_t n, void *buf) const override
uint256 getLedgerHash() const
Blob getFieldVL(SField const &field) const
Blob getSignature() const
beast::Journal debugLog()
Returns a debug journal.
static STBase * emplace(std::size_t n, void *buf, T &&val)
Defines the fields and their attributes within a STObject.
static SOTemplate const & getFormat()
Blob getSerialized() const
NetClock::time_point mSeen
void setSeen(NetClock::time_point s)
const SField sfValidation(access, STI_VALIDATION, 257, "Validation")
NetClock::time_point getSignTime() const
NetClock::time_point getSeenTime() const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
A type which can be exported to a well known binary format.
boost::optional< XRPAmount > baseFee
const std::uint32_t vfFullyCanonicalSig
uint256 getSigningHash() const
PublicKey getSignerPublic() const
boost::optional< XRPAmount > reserveIncrement
virtual Json::Value getJson(JsonOptions options) const override
Fees to set when issuing a new validation.
STValidation(SerialIter &sit, LookupNodeID &&lookupNodeID, bool checkSignature)
Construct a STValidation from a peer.