Mine blocks immediately (before the RPC call returns) and allocate block reward to passed address. Replaces deprecated "generate(self,numblocks)" method. numblocks - How many blocks are generated immediately. addr - Address to receive block reward (CBitcoinAddres
(self, numblocks, addr)
| 418 | return (lx(blk_hash) for blk_hash in r) |
| 419 | |
| 420 | def generatetoaddress(self, numblocks, addr): |
| 421 | """Mine blocks immediately (before the RPC call returns) and |
| 422 | allocate block reward to passed address. Replaces deprecated |
| 423 | "generate(self,numblocks)" method. |
| 424 | |
| 425 | numblocks - How many blocks are generated immediately. |
| 426 | addr - Address to receive block reward (CBitcoinAddress instance) |
| 427 | |
| 428 | Returns iterable of block hashes generated. |
| 429 | """ |
| 430 | r = self._call('generatetoaddress', numblocks, str(addr)) |
| 431 | return (lx(blk_hash) for blk_hash in r) |
| 432 | |
| 433 | def getaccountaddress(self, account=None): |
| 434 | """Return the current Bitcoin address for receiving payments to this |