mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/geth: Integrate winsvega's feedback
This commit is contained in:
parent
9b10418312
commit
d7bbdca212
1 changed files with 3 additions and 5 deletions
|
|
@ -68,7 +68,6 @@ var (
|
|||
)
|
||||
|
||||
type RetestethTestAPI interface {
|
||||
SetRPCPayloadSize(ctx context.Context, size int) (int, error)
|
||||
SetChainParams(ctx context.Context, chainParams ChainParams) (bool, error)
|
||||
MineBlocks(ctx context.Context, number uint64) (bool, error)
|
||||
ModifyTimestamp(ctx context.Context, interval uint64) (bool, error)
|
||||
|
|
@ -272,10 +271,6 @@ func (e *NoRewardEngine) Close() error {
|
|||
return e.inner.Close()
|
||||
}
|
||||
|
||||
func (api *RetestethAPI) SetRPCPayloadSize(ctx context.Context, size int) (int, error) {
|
||||
return rpc.SetMaxRequestContentLength(size)
|
||||
}
|
||||
|
||||
func (api *RetestethAPI) SetChainParams(ctx context.Context, chainParams ChainParams) (bool, error) {
|
||||
// Clean up
|
||||
if api.blockchain != nil {
|
||||
|
|
@ -870,6 +865,9 @@ func retesteth(ctx *cli.Context) error {
|
|||
vhosts := splitAndTrim(ctx.GlobalString(utils.RPCVirtualHostsFlag.Name))
|
||||
cors := splitAndTrim(ctx.GlobalString(utils.RPCCORSDomainFlag.Name))
|
||||
|
||||
// Increase the RPC request size
|
||||
rpc.SetMaxRequestContentLength(10 * 1024 * 1024)
|
||||
|
||||
// start http server
|
||||
httpEndpoint := fmt.Sprintf("%s:%d", ctx.GlobalString(utils.RPCListenAddrFlag.Name), ctx.Int(rpcPortFlag.Name))
|
||||
listener, _, err := rpc.StartHTTPEndpoint(httpEndpoint, rpcAPI, []string{"test", "eth", "debug", "web3"}, cors, vhosts, rpc.DefaultHTTPTimeouts)
|
||||
|
|
|
|||
Loading…
Reference in a new issue