MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / generate

Method generate

bitcoin/rpc.py:407–418  ·  view source on GitHub ↗

DEPRECATED (will be removed in bitcoin-core v0.19) Mine blocks immediately (before the RPC call returns) numblocks - How many blocks are generated immediately. Returns iterable of block hashes generated.

(self, numblocks)

Source from the content-addressed store, hash-verified

405 return r
406
407 def generate(self, numblocks):
408 """
409 DEPRECATED (will be removed in bitcoin-core v0.19)
410
411 Mine blocks immediately (before the RPC call returns)
412
413 numblocks - How many blocks are generated immediately.
414
415 Returns iterable of block hashes generated.
416 """
417 r = self._call('generate', numblocks)
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

Callers

nothing calls this directly

Calls 2

lxFunction · 0.90
_callMethod · 0.45

Tested by

no test coverage detected