Skip to content

Modules: miner

miner_setEtherbase

SetEtherbase sets the etherbase of the miner.

Params (1)

Parameters must be given by position.

1:
etherbase common.Address

  • Required: ✓ Yes

=== "Schema"

``` Schema

- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string


```

=== "Raw"

``` Raw
{
    "description": "Hex representation of a Keccak 256 hash POINTER",
    "pattern": "^0x[a-fA-F\\d]{64}$",
    "title": "keccak",
    "type": [
        "string"
    ]
}
```

Result

bool

  • Required: ✓ Yes

Client Method Invocation Examples

=== "Shell HTTP"

``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "miner_setEtherbase", "params": [<etherbase>]}'
```

=== "Shell WebSocket"

``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "miner_setEtherbase", "params": [<etherbase>]}'
```

=== "Javascript Console"

``` js
miner.setEtherbase(etherbase);
```

miner_setGasLimit

SetGasLimit sets the gaslimit to target towards during mining.

Params (1)

Parameters must be given by position.

1:
gasLimit hexutil.Uint64

  • Required: ✓ Yes

=== "Schema"

``` Schema

- description: `Hex representation of a uint64`
- pattern: `^0x([a-fA-F\d])+$`
- title: `uint64`
- type: string


```

=== "Raw"

``` Raw
{
    "description": "Hex representation of a uint64",
    "pattern": "^0x([a-fA-F\\d])+$",
    "title": "uint64",
    "type": [
        "string"
    ]
}
```

Result

bool

  • Required: ✓ Yes

Client Method Invocation Examples

=== "Shell HTTP"

``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "miner_setGasLimit", "params": [<gasLimit>]}'
```

=== "Shell WebSocket"

``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "miner_setGasLimit", "params": [<gasLimit>]}'
```

=== "Javascript Console"

``` js
miner.setGasLimit(gasLimit);
```

miner_setRecommitInterval

SetRecommitInterval updates the interval for miner sealing work recommitting.

Params (1)

Parameters must be given by position.

1:
interval int

  • Required: ✓ Yes

=== "Schema"

``` Schema

- description: `Hex representation of the integer`
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: string


```

=== "Raw"

``` Raw
{
    "description": "Hex representation of the integer",
    "pattern": "^0x[a-fA-F0-9]+$",
    "title": "integer",
    "type": [
        "string"
    ]
}
```

Result

None

Client Method Invocation Examples

=== "Shell HTTP"

``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "miner_setRecommitInterval", "params": [<interval>]}'
```

=== "Shell WebSocket"

``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "miner_setRecommitInterval", "params": [<interval>]}'
```

=== "Javascript Console"

``` js
miner.setRecommitInterval(interval);
```

miner_stop

Stop terminates the miner, both at the consensus engine level as well as at
the block creation level.

Params (0)

None

Result

None

Client Method Invocation Examples

=== "Shell HTTP"

``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "miner_stop", "params": []}'
```

=== "Shell WebSocket"

``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "miner_stop", "params": []}'
```

=== "Javascript Console"

``` js
miner.stop();
```