xrpld
Loading...
Searching...
No Matches
FeeVote.h
1#pragma once
2
3#include <xrpl/beast/utility/Journal.h>
4#include <xrpl/ledger/ReadView.h>
5#include <xrpl/protocol/Fees.h>
6#include <xrpl/protocol/Rules.h>
7#include <xrpl/protocol/STValidation.h>
8#include <xrpl/shamap/SHAMap.h>
9
10#include <memory>
11#include <vector>
12
13namespace xrpl {
14
19{
20public:
21 virtual ~FeeVote() = default;
22
29 virtual void
30 doValidation(Fees const& lastFees, Rules const& rules, STValidation& val) = 0;
31
38 virtual void
40 std::shared_ptr<ReadView const> const& lastClosedLedger,
41 std::vector<std::shared_ptr<STValidation>> const& parentValidations,
42 std::shared_ptr<SHAMap> const& initialPosition) = 0;
43};
44
45struct FeeSetup;
52makeFeeVote(FeeSetup const& setup, beast::Journal journal);
53
54} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:44
Manager to process fee votes.
Definition FeeVote.h:19
virtual ~FeeVote()=default
virtual void doValidation(Fees const &lastFees, Rules const &rules, STValidation &val)=0
Add local fee preference to validation.
virtual void doVoting(std::shared_ptr< ReadView const > const &lastClosedLedger, std::vector< std::shared_ptr< STValidation > > const &parentValidations, std::shared_ptr< SHAMap > const &initialPosition)=0
Cast our local vote on the fee.
Rules controlling protocol behavior.
Definition Rules.h:40
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
std::unique_ptr< FeeVote > makeFeeVote(FeeSetup const &setup, beast::Journal journal)
Create an instance of the FeeVote logic.
Fee schedule for startup / standalone, and to vote for.
Reflects the fee settings for a particular ledger.