diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-03-26 14:30:23 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-03-26 21:10:43 +0000 |
commit | 600a3cf0c0ca0a99dbdc91d32138db3c8aa4165c (patch) | |
tree | edc8745f2439b59a82ee834df9d43721bc6bd475 /src/cryptonote_core/blockchain.h | |
parent | wallet: handle rare case where fee adjustment can bump to the next kB (diff) | |
download | monero-600a3cf0c0ca0a99dbdc91d32138db3c8aa4165c.tar.xz |
New RPC and daemon command to get output histogram
This is a list of existing output amounts along with the number
of outputs of that amount in the blockchain.
The daemon command takes:
- no parameters: all outputs with at least 3 instances
- one parameter: all outputs with at least that many instances
- two parameters: all outputs within that many instances
The default starts at 3 to avoid massive spamming of all dust
outputs in the blockchain, and is the current minimum mixin
requirement.
An optional vector of amounts may be passed, to request
histogram only for those outputs.
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r-- | src/cryptonote_core/blockchain.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index 94def1aa9..36e0fedfc 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -683,6 +683,15 @@ namespace cryptonote bool flush_txes_from_pool(const std::list<crypto::hash> &txids); /** + * @brief return a histogram of outputs on the blockchain + * + * @param amounts optional set of amounts to lookup + * + * @return a set of amount/instances + */ + std::map<uint64_t, uint64_t> get_output_histogram(const std::vector<uint64_t> &amounts) const; + + /** * @brief perform a check on all key images in the blockchain * * @param std::function the check to perform, pass/fail |