aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.h
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2022-04-18 02:12:55 -0500
committerluigi1111 <luigi1111w@gmail.com>2022-04-18 02:12:55 -0500
commit2b999f5398426d2c4452e001cfebad34abb686ff (patch)
tree08bbe9298a72bd99ca3e35d3df667d81ef07711e /src/cryptonote_core/blockchain.h
parentMerge pull request #8242 (diff)
parentFee changes from ArticMine (diff)
downloadmonero-2b999f5398426d2c4452e001cfebad34abb686ff.tar.xz
Merge pull request #7819
b030f20 Fee changes from ArticMine (moneromooo-monero) 9f786f0 epee: allow copying a rolling_median_t object (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r--src/cryptonote_core/blockchain.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h
index 5460d7761..7a94f6358 100644
--- a/src/cryptonote_core/blockchain.h
+++ b/src/cryptonote_core/blockchain.h
@@ -648,6 +648,22 @@ namespace cryptonote
* @return the fee estimate
*/
uint64_t get_dynamic_base_fee_estimate(uint64_t grace_blocks) const;
+ void get_dynamic_base_fee_estimate_2021_scaling(uint64_t grace_blocks, uint64_t base_reward, uint64_t Mnw, uint64_t Mlw, std::vector<uint64_t> &fees) const;
+
+ /**
+ * @brief get four levels of dynamic per byte fee estimate for the next few blocks
+ *
+ * The dynamic fee is based on the block weight in a past window, and
+ * the current block reward. It is expressed per byte, and is based on
+ * https://github.com/ArticMine/Monero-Documents/blob/master/MoneroScaling2021-02.pdf
+ * This function calculates an estimate for a dynamic fee which will be
+ * valid for the next grace_blocks
+ *
+ * @param grace_blocks number of blocks we want the fee to be valid for
+ *
+ * @return the fee estimates (4 of them)
+ */
+ void get_dynamic_base_fee_estimate_2021_scaling(uint64_t grace_blocks, std::vector<uint64_t> &fees) const;
/**
* @brief validate a transaction's fee