Skip to content
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

RPC account_history add block height and optional reverse #1822


3 participants
Copy link

commented Mar 13, 2019

Fixes #1820 .


  • Wait for #1355
  • Merge those changes here
  • Modify tests to account for block height and reverse

==== Wiki update ====

Account history



    "account": "xrb_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est",   
    "history": [   
            "type": "send",   
            "account": "xrb_38ztgpejb7yrm7rr586nenkn597s3a1sqiy3m3uyqjicht7kzuhnihdk6zpz",   
            "amount": "80000000000000000000000000000000000",   
            "local_timestamp": "1551532723",  
            "height": "60", 
            "hash": "80392607E85E73CC3E94B4126F24488EBDFEB174944B890C97E8F36D89591DC5"   
    "previous": "8D3AB98B301224253750D448B4BD997132400CEDD0A8432F775724F2D9821C72"   


  • offset: skips a number of blocks starting from head (if given). Not often used.
  • reverse: if true, the response starts from head (if given, otherwise the first block of the account), and lists all blocks up to the frontier. Note: the field previous in the response changes to next.

@zhyatt zhyatt requested a review from SergiySW Mar 13, 2019

@zhyatt zhyatt added this to the V19.0 milestone Mar 13, 2019

@guilhermelawless guilhermelawless marked this pull request as ready for review Mar 13, 2019

@SergiySW SergiySW added this to CP2 (2019-03-27) in V19 Mar 14, 2019

@SergiySW SergiySW self-assigned this Mar 14, 2019


This comment has been minimized.

Copy link
Contributor Author

commented Mar 15, 2019

Merge and tests done.

Show resolved Hide resolved nano/core_test/rpc.cpp Outdated

@SergiySW SergiySW merged commit e3730bd into nanocurrency:master Mar 18, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@guilhermelawless guilhermelawless deleted the guilhermelawless:rpc/account_history_height_reverse branch Mar 18, 2019

guilhermelawless added a commit to guilhermelawless/nano-node that referenced this pull request Apr 15, 2019

RPC account_history add block height and optional reverse (nanocurren…

* Add block heights to response

* Add reverse option, changes 'previous' to 'next'

* If reverse given, but head not given, start from height 0

* Get to open block through account_info

* Test request fields count and reverse, response field height

* Test response field next

* assert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.