From ed33f4bb5fb9d607129c8f603fd0e6d40f0b4a6f Mon Sep 17 00:00:00 2001 From: Simon Jentzsch Date: Mon, 3 Feb 2020 20:44:01 +0100 Subject: [PATCH] add request count and attempts --- scripts/_in3.sh | 2 ++ src/core/client/client_init.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/_in3.sh b/scripts/_in3.sh index f6f319b25..b100ce0fc 100644 --- a/scripts/_in3.sh +++ b/scripts/_in3.sh @@ -68,6 +68,8 @@ args=( '-q[quiet no debug output]' '-ri[read response from stdin]' '-ro[write raw response to stdout]' + '-a[max number of attempts before giving up (default 5)]:attempts:(1 2 3 4 5 6 7 8 9)' + '-rc[number of request per try (default 1)]:requestCount:(1 2 3 4 5 6 7 8 9)' ':method:{_describe command subcmds}' ':arg1:{_describe command sig_in3 -- sig_erc20 -- sig_ms}' diff --git a/src/core/client/client_init.c b/src/core/client/client_init.c index 121f0de58..5dc154586 100644 --- a/src/core/client/client_init.c +++ b/src/core/client/client_init.c @@ -204,7 +204,7 @@ static in3_ret_t in3_client_init(in3_t* c, chain_id_t chain_id) { c->chain_id = chain_id ? chain_id : ETH_CHAIN_ID_MAINNET; // mainnet c->key = NULL; c->finality = 0; - c->max_attempts = 3; + c->max_attempts = 5; c->max_block_cache = 0; c->max_code_cache = 0; c->max_verified_hashes = 5;