New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide history for all addresses (not just those in the wallet) #459

wants to merge 8 commits into
base: develop


None yet
2 participants
Copy link

zathras-crypto commented Feb 28, 2017

This PR serves to provide the capability to retrieve transaction history for any address. Currently it is only possible to retrieve transaction history for addresses in the wallet.

This capability should ease integration for many cases.

A new call omni_gethistory operates similarly to omni_listtransactions (which is wallet only). An address is supplied and by default the 10 most recent transactions are provided. Count, start and end block parameters are optional for refining the results and expanding to more than the default 10 transactions.

Note: whilst locating the transactions for an address is fast, decoding them is just as usual. As such it is possible to use these calls irresponsibly - for example if omni_gethistory was called with an address containing thousands of historic transactions and further the count parameter was explicitly set to say 99999, Omni Core would need to do so much work to generate the response a timeout from RPC is more likely than a response to the query.

Note, this PR is fully functional but is also a prototype. Needs to be cleaned up before taking it on for real.


// obtain parameters - default to last 10 transactions with no block restrictions
std::string address = params[0].get_str();

This comment has been minimized.


dexX7 Feb 28, 2017


Nit: let's use ParseAddress.


This comment has been minimized.

Copy link

dexX7 commented Mar 7, 2017

First of all, very nice!

Do you think we should get this into 0.2?


This comment has been minimized.

Copy link

dexX7 commented Jan 30, 2018

Given this PR is outdated and needs further review, it's going to be closed for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment