Read request configuration options. (#236)

* Ignores read requests when contract execution disabled.
* Added concurrent_read_reqeuests config.
* Improved metric test script.
This commit is contained in:
Ravin Perera
2021-02-05 14:54:42 +05:30
committed by GitHub
parent a4399544b9
commit e1b1382599
6 changed files with 107 additions and 58 deletions

View File

@@ -144,6 +144,10 @@ namespace usr
if (msg_type == msg::usrmsg::MSGTYPE_CONTRACT_READ_REQUEST)
{
// Ignore the request if contract execution is disabled or read requests disallowed.
if (!conf::cfg.contract.execute || conf::cfg.user.concurrent_read_reqeuests == 0)
return 0;
std::string content;
if (parser.extract_read_request(content) != -1)
{