Create generatetoaddress rpc

Creates the generatetoaddress rpc which is virtually identical to the generate rpc except that it takes an argument for the address to mine to. It does not rely on wallet functionality.

The mining code shared by generate and generatetoaddress has been moved to another method to reduce duplication.
This commit is contained in:
Andrew C
2016-03-12 11:41:51 -05:00
parent 29b2be6ad7
commit fe00ca758a
4 changed files with 81 additions and 33 deletions

View File

@@ -299,6 +299,7 @@ static const CRPCCommand vRPCCommands[] =
/* Coin generation */
{ "generating", "generate", &generate, true },
{ "generating", "generatetoaddress", &generatetoaddress, true },
/* Raw transactions */
{ "rawtransactions", "createrawtransaction", &createrawtransaction, true },