mining.cpp::generatetoaddress
挖nblocks个区块,并将挖矿收入存入address指定的地址中。可以用来CPU挖矿,不过目前比特币的计算量,已经不可能挖出来了。
参数:
- nblocks (numeric, required) How many blocks are generated immediately.
- address (string, required) The address to send the newly generated bitcoin to.
- maxtries (numeric, optional) How many iterations to try (default = 1000000).
结果:
区块的hash值
样例:
挖11个区块到myaddress中1
> bitcoin-cli generatetoaddress 11 "myaddress"