title | type |
---|---|
Set Block Selection Algorithm |
dlt |
Modifies the running DLT Node or Miner software and changes the way blocks are selected for mining. It is also possible to activate or deactivate mining using this method.
ID | Name | Description |
---|---|---|
-1 | No algorithm | Stop mining. |
0 | lowestDifficulty | Pick the block with the lowest difficulty value. |
1 | randomLowestDifficulty | Sort blocks from easiest to hardest and pick a random block within the easiest 500 blocks. |
2 | latestBlock | Pick the most recent accepted block. |
3 | random | Pick a random block. |
Parameter | Type | Required | Description |
---|---|---|---|
algorithm | Number | Yes | New block selection algorithm. See the values above. |
Error | Description |
---|---|
RPC_INTERNAL_ERROR | An unknown error occurred in the node. Please check the node log for details. |
- success: JSON result with all null values
- fail: JSON encoded details with a non-null error and a null result
GET http://localhost:8081/setBlockSelectionAlgorithm?algorithm=1
{
"result": null,
"error": null,
"id": null
}