| 1 | <?php |
||
| 11 | class Generating extends AbstractApi |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * The generate RPC nearly instantly generates |
||
| 15 | * blocks (in regtest mode only) |
||
| 16 | * |
||
| 17 | * @param int $blocks The number of blocks to generate. The RPC call |
||
| 18 | * will not return until all blocks have been generated |
||
| 19 | * @return mixed |
||
| 20 | */ |
||
| 21 | public function generate($blocks) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * The getgenerate RPC returns true if the node is set to |
||
| 28 | * generate blocks using its CPU. |
||
| 29 | * |
||
| 30 | * @return mixed |
||
| 31 | */ |
||
| 32 | public function getGenerate() |
||
| 36 | |||
| 37 | /** |
||
| 38 | * The setgenerate RPC enables or disables hashing to attempt |
||
| 39 | * to find the next block. |
||
| 40 | * |
||
| 41 | * @param bool $enable Set to true to enable generation; |
||
| 42 | * set to false to disable generation |
||
| 43 | * @param int $processors The number of processors to use. Defaults to 1. |
||
| 44 | * Set to -1 to use all processors |
||
| 45 | * @return mixed |
||
| 46 | */ |
||
| 47 | public function setGenerate($enable,$processors) |
||
| 51 | } |