diff options
Diffstat (limited to 'src/rpc/blockchain.h')
-rw-r--r-- | src/rpc/blockchain.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rpc/blockchain.h b/src/rpc/blockchain.h index 3aa8de2d2b..544bc62c36 100644 --- a/src/rpc/blockchain.h +++ b/src/rpc/blockchain.h @@ -1,14 +1,20 @@ -// Copyright (c) 2017 The Bitcoin Core developers +// Copyright (c) 2017-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_RPC_BLOCKCHAIN_H #define BITCOIN_RPC_BLOCKCHAIN_H +#include <vector> +#include <stdint.h> +#include <amount.h> + class CBlock; class CBlockIndex; class UniValue; +static constexpr int NUM_GETBLOCKSTATS_PERCENTILES = 5; + /** * Get the difficulty of the net wrt to the given block index, or the chain tip if * not provided. @@ -33,4 +39,7 @@ UniValue mempoolToJSON(bool fVerbose = false); /** Block header to JSON */ UniValue blockheaderToJSON(const CBlockIndex* blockindex); +/** Used by getblockstats to get feerates at different percentiles by weight */ +void CalculatePercentilesByWeight(CAmount result[NUM_GETBLOCKSTATS_PERCENTILES], std::vector<std::pair<CAmount, int64_t>>& scores, int64_t total_weight); + #endif |