aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-01 22:16:00 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-01 22:16:00 +0100
commit1593553e03aef8d44621aaf79a33ba25f69a2bd7 (patch)
treeeb2e86a6b9c08ea92930795d620b3214062910bd /src/rpc
parentMerge pull request #937 (diff)
downloadmonero-1593553e03aef8d44621aaf79a33ba25f69a2bd7.tar.xz
new unlocked parameter to output_histogram
This constrains the number of instances of any amount to the unlocked ones (as defined by the default unlock time setting: outputs with non default unlock time are not considered, so may be counted as unlocked even if they are not actually unlocked).
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp2
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 166d1ba94..90f7a8434 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -1126,7 +1126,7 @@ namespace cryptonote
std::map<uint64_t, uint64_t> histogram;
try
{
- histogram = m_core.get_blockchain_storage().get_output_histogram(req.amounts);
+ histogram = m_core.get_blockchain_storage().get_output_histogram(req.amounts, req.unlocked);
}
catch (const std::exception &e)
{
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index 63167e249..89370a035 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -1071,11 +1071,13 @@ namespace cryptonote
std::vector<uint64_t> amounts;
uint64_t min_count;
uint64_t max_count;
+ bool unlocked;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(amounts);
KV_SERIALIZE(min_count);
KV_SERIALIZE(max_count);
+ KV_SERIALIZE(unlocked);
END_KV_SERIALIZE_MAP()
};