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

docs: create entry for getstakeversions in rpcapi #819

Merged
merged 1 commit into from
Aug 31, 2017

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented Aug 17, 2017

Fixes #532

| | |
|---|---|
|Method|getstakeversions|
|Parameters|1. hash (*chainhash.Hash, required) - The hash of the block being queried for stake versions |
Copy link
Member

@davecgh davecgh Aug 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be string. You can't send a *chainhash.Hash over RPC.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ dcrctl help getstakeversions
getstakeversions "hash" count

Returns the stake versions statistics.

Arguments:
1. hash  (string, required)  The start block hash.
2. count (numeric, required) The number of blocks that will be returned.

Result:
{
 "stakeversions": [{ (array of object) Array of stake versions per block.
  "hash": "value",   (string)          Hash of the block.
  "height": n,       (numeric)         Height of the block.
  "blockversion": n, (numeric)         The block version
  "stakeversion": n, (numeric)         The stake version of the block
  "votes": [{        (array of object) The version and bits of each vote in the block
   "version": n,     (numeric)         The version of the vote.
   "bits": n,        (numeric)         The bits assigned by the vote.
  },...],
 },...],
}

Copy link
Member

@davecgh davecgh Aug 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can see you're missing the required count and the returned result isn't specified.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating the doc, will be converting the result section to the new format.

@dnldd dnldd force-pushed the getstakeversionsdocentry branch from 00d1b49 to b6e0ed6 Compare August 21, 2017 22:50
@davecgh davecgh merged commit 3b8f09f into decred:master Aug 31, 2017
@dnldd dnldd deleted the getstakeversionsdocentry branch August 31, 2017 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants