20 #include <ripple/protocol/STValidation.h>
21 #include <ripple/protocol/HashPrefix.h>
22 #include <ripple/basics/contract.h>
23 #include <ripple/basics/Log.h>
24 #include <ripple/json/to_string.h>
79 if (!amendments.
empty())
131 <<
"Exception validating validation";
181 static const FormatHolder holder;
183 return holder.format;
const SF_U32 sfLoadFee(access, STI_UINT32, 24, "LoadFee")
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)
uint256 getConsensusHash() const
boost::optional< XRPAmount > reserveBase
boost::optional< KeyType > publicKeyType(Slice const &slice)
Returns the type of public key.
void setFieldV256(SField const &field, STVector256 const &v)
const SF_Blob sfSigningPubKey(access, STI_VL, 3, "SigningPubKey")
boost::optional< std::uint32_t > loadFee
uint256 getLedgerHash() const
const SF_U32 sfFlags(access, STI_UINT32, 2, "Flags")
Slice slice() const noexcept
void setFieldVL(SField const &field, Blob const &)
Blob getFieldVL(SField const &field) const
const SF_U32 sfReserveBase(access, STI_UINT32, 31, "ReserveBase")
Blob getSignature() const
const SF_Blob sfSignature(access, STI_VL, 6, "Signature", SField::sMD_Default, SField::notSigning)
beast::Journal debugLog()
Returns a debug journal.
T time_since_epoch(T... args)
Defines the fields and their attributes within a STObject.
Buffer signDigest(PublicKey const &pk, SecretKey const &sk, uint256 const &digest)
Generate a signature for a message digest.
void setFieldH256(SField const &field, uint256 const &)
const SF_U32 sfSigningTime(access, STI_UINT32, 9, "SigningTime")
static SOTemplate const & getFormat()
Blob getSerialized() const
NetClock::time_point mSeen
const SF_U32 sfLedgerSequence(access, STI_UINT32, 6, "LedgerSequence")
std::uint32_t getFlags() const
@ validation
validation for signing
const SField sfValidation(access, STI_VALIDATION, 257, "Validation")
NetClock::time_point getSignTime() const
bool verifyDigest(PublicKey const &publicKey, uint256 const &digest, Slice const &sig, bool mustBeFullyCanonical)
Verify a secp256k1 signature on the digest of a message.
NetClock::time_point getSeenTime() const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
uint256 getSigningHash(HashPrefix prefix) const
virtual void add(Serializer &s) const override
boost::optional< XRPAmount > baseFee
const SF_U32 sfReserveIncrement(access, STI_UINT32, 32, "ReserveIncrement")
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.
Blob const & peekData() const
const std::uint32_t vfFullyCanonicalSig
const SF_U32 sfCloseTime(access, STI_UINT32, 7, "CloseTime")
bool setFlag(std::uint32_t)
uint256 getSigningHash() const
PublicKey getSignerPublic() const
const SF_U64 sfCookie(access, STI_UINT64, 10,"Cookie")
const SF_Vec256 sfAmendments(access, STI_VECTOR256, 3, "Amendments")
std::uint32_t getFieldU32(SField const &field) const
boost::optional< XRPAmount > reserveIncrement
const SF_U64 sfBaseFee(access, STI_UINT64, 5, "BaseFee")
void setFieldU64(SField const &field, std::uint64_t)
const SF_U256 sfConsensusHash(access, STI_HASH256, 23, "ConsensusHash")
Fees to set when issuing a new validation.
void setFieldU32(SField const &field, std::uint32_t)
const SF_U256 sfLedgerHash(access, STI_HASH256, 1, "LedgerHash")
uint256 getFieldH256(SField const &field) const
STValidation(SerialIter &sit, LookupNodeID &&lookupNodeID, bool checkSignature)
Construct a STValidation from a peer.