Add option for user to set max size limit for RPC requests (#9010)

* Add option for user to set max size limit for RPC requests as requested in #8961.

* Add max_payload to tests.

* Change name for max payload option and change value from NUM to MB.

* Fix broken test.

* Fix incorrect indentation.
This commit is contained in:
Matthew Martin
2018-07-02 01:23:57 -07:00
committed by Tomasz Drwięga
parent 34bf2452c3
commit 67721f3413
5 changed files with 18 additions and 1 deletions

View File

@@ -879,6 +879,10 @@ impl Configuration {
_ => 1,
},
processing_threads: self.args.arg_jsonrpc_threads,
max_payload: match self.args.arg_jsonrpc_max_payload {
Some(max) if max > 0 => max as usize,
_ => 5usize,
},
};
Ok(conf)