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] Add new 'generate' command #362

Closed
davecgh opened this issue Apr 1, 2015 · 1 comment
Closed

[rpc] Add new 'generate' command #362

davecgh opened this issue Apr 1, 2015 · 1 comment

Comments

@davecgh
Copy link
Member

davecgh commented Apr 1, 2015

It is quite useful when doing regression and simulation testing to be able to generate a specific number of blocks. Currently, the only available option is to call setgenerate to enable and disable block generation, but there is no way to generate a specific number of blocks.

Thus, a new command named generate should be introduced which takes a single numeric (int) parameter with the number of blocks to generate. The RPC should block until the blocks are generated and it should return the hashes of the generated blocks as a JSON array of strings.

@davecgh
Copy link
Member Author

davecgh commented Apr 21, 2015

@aakselrod has graciously taken on implementing this.

aakselrod added a commit to aakselrod/btcd that referenced this issue Apr 28, 2015
Create GenerateCmd and GenerateResult in btcjson v2. Updated tests
to check GenerateCmd.

Update chaincfg/params.go with a new bool in Params, GenerateSupported,
with true values in SimNetParams and RegressionNetParams and false in
the others.

Add generateNBlocks function to cpuminer.go and handleGenerate
function to rpcserver.go.

Update documentation for the RPC calls.
aakselrod added a commit to aakselrod/btcd that referenced this issue Apr 28, 2015
Create GenerateCmd and GenerateResult in btcjson v2. Updated tests
to check GenerateCmd.

Update chaincfg/params.go with a new bool in Params, GenerateSupported,
with true values in SimNetParams and RegressionNetParams and false in
the others.

Add generateNBlocks function to cpuminer.go and handleGenerate
function to rpcserver.go.

Update documentation for the RPC calls.
aakselrod added a commit to aakselrod/btcd that referenced this issue Apr 28, 2015
Create GenerateCmd and GenerateResult in btcjson v2. Updated tests
to check GenerateCmd.

Update chaincfg/params.go with a new bool in Params, GenerateSupported,
with true values in SimNetParams and RegressionNetParams and false in
the others.

Add generateNBlocks function to cpuminer.go and handleGenerate
function to rpcserver.go.

Update documentation for the RPC calls.
aakselrod added a commit to aakselrod/btcd that referenced this issue Apr 28, 2015
Create GenerateCmd and GenerateResult in btcjson v2. Updated tests
to check GenerateCmd.

Update chaincfg/params.go with a new bool in Params, GenerateSupported,
with true values in SimNetParams and RegressionNetParams and false in
the others.

Add generateNBlocks function to cpuminer.go and handleGenerate
function to rpcserver.go.

Update documentation for the RPC calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant