Generating#
- class defichain.node.Generating(node)#
- generatetoaddress(nblocks: int, address: str, maxtries: int = 1) ['str'] #
Mine blocks immediately to a specified address (before the RPC call returns)
- Parameters:
nblocks (int) – (required) How many blocks are generated immediately
address (str) – (required) The address to send the newly generated DFI to
maxtries (int) – (optional) How many iterations to try
- Returns:
[…] (array) – hashes of blocks generated
- Example:
Generate 11 blocks to myaddress
>>> node.generating.generatetoaddress(11, address)