Skip to content

Commit

Permalink
Merge branch 'develop' into add_time_to_cli_args
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeseese committed Oct 25, 2018
2 parents 3c22210 + 8d3e958 commit f598676
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<p align="center">
<em>NOTICE</em>: <code>testrpc</code> is now <code>ganache-cli</code>. Use it just as you would <code>testrpc</code>.
</p>
<hr/>

[![npm](https://img.shields.io/npm/v/ganache-cli.svg)]()
[![npm](https://img.shields.io/npm/dm/ganache-cli.svg)]()
[![Build Status](https://travis-ci.org/trufflesuite/ganache-cli.svg?branch=master)](https://travis-ci.org/trufflesuite/ganache-cli)
*NOTICE*: `testrpc` is now `ganache-cli`. Use it just as you would `testrpc`.
[![Build Status](https://travis-ci.org/trufflesuite/ganache-cli.svg?branch=master)](https://travis-ci.org/trufflesuite/ganache-cli)

<p align="center">
<img src="https://github.com/ethereumjs/testrpc/blob/ganache-cli/resources/icons/ganache-cli-128x128.png?raw=true">
<img src="/resources/icons/ganache-cli-128x128.png">
</p>

## Welcome to Ganache CLI
Expand Down Expand Up @@ -60,6 +64,7 @@ Options:
* `--version`: Display the version of ganache-cli
* `--noVMErrorsOnRPCResponse`: Do not transmit transaction failures as RPC errors. Enable this flag for error reporting behaviour which is compatible with other clients such as geth and Parity.
* `--allowUnlimitedContractSize`: Allows unlimited contract sizes while debugging. By enabling this flag, the check within the EVM for contract size limit of 24KB (see EIP-170) is bypassed. Enabling this flag **will** cause ganache-cli to behave differently than production environments.
* `--keepAliveTimeout`: Sets the HTTP server's `keepAliveTimeout` in milliseconds. See the [NodeJS HTTP docs](https://nodejs.org/api/http.html#http_server_keepalivetimeout) for details. `5000` by default.

Special Options:

Expand Down Expand Up @@ -122,6 +127,7 @@ Both `.provider()` and `.server()` take a single object which allows you to spec
* `"account_keys_path"`: `String` - Specifies a file to save accounts and private keys to, for testing.
* `"vmErrorsOnRPCResponse"`: `boolean` - Whether or not to transmit transaction failures as RPC errors. Set to `false` for error reporting behaviour which is compatible with other clients such as geth and Parity.
* `"allowUnlimitedContractSize"`: `boolean` - Allows unlimited contract sizes while debugging. By setting this to `true`, the check within the EVM for contract size limit of 24KB (see [EIP-170](https://git.io/vxZkK)) is bypassed. Setting this to true **will** cause ganache-core to behave differently than production environments. (default: `false`; **ONLY** set to `true` during debugging).
* `"keepAliveTimeout"`: Sets the HTTP server's `keepAliveTimeout` in milliseconds. See the [NodeJS HTTP docs](https://bit.ly/2Cr0ZEh) for details. `5000` by default.

### Implemented Methods

Expand Down
6 changes: 6 additions & 0 deletions args.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ module.exports = exports = function(yargs, version, isDocker) {
default: isDocker ? '0.0.0.0' : '127.0.0.1',
describe: 'Hostname to listen on'
})
.option('keepAliveTimeout', {
group: 'Network:',
type: 'number',
default: 5000,
describe: 'The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed.'
})
.option('a', {
group: 'Accounts:',
alias: 'accounts',
Expand Down
3 changes: 2 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ var options = {
vmErrorsOnRPCResponse: !argv.noVMErrorsOnRPCResponse,
logger: logger,
allowUnlimitedContractSize: argv.allowUnlimitedContractSize,
time: argv.t
time: argv.t,
keepAliveTimeout: argv.keepAliveTimeout
}

var fork_address;
Expand Down

0 comments on commit f598676

Please sign in to comment.