diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-10-28 21:19:40 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-10-31 08:38:00 +0000 |
commit | e6deb8abda0b6560c8691f376d8a86aab163dd77 (patch) | |
tree | f6e0167b114fbf3ee379f18c5d0a3c3d554a33f4 /src/cryptonote_core/blockchain.h | |
parent | core: dynamic fee algorithm from ArticMine (diff) | |
download | monero-e6deb8abda0b6560c8691f376d8a86aab163dd77.tar.xz |
rpc: add a dynamic fee estimation RPC call
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r-- | src/cryptonote_core/blockchain.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index 3311798f0..eb7a050b2 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -526,6 +526,20 @@ namespace cryptonote static uint64_t get_dynamic_per_kb_fee(uint64_t block_reward, size_t median_block_size); /** + * @brief get dynamic per kB fee estimate for the next few blocks + * + * The dynamic fee is based on the block size in a past window, and + * the current block reward. It is expressed by kB. 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 per kB fee estimate + */ + uint64_t get_dynamic_per_kb_fee_estimate(uint64_t grace_blocks) const; + + /** * @brief validate a transaction's fee * * This function validates the fee is enough for the transaction. |