@@ -53,6 +53,10 @@ pub struct EnvVarsMapping {
5353 ///
5454 /// Set by the environment variable `GRAPH_IPFS_REQUEST_LIMIT`. Defaults to 100.
5555 pub ipfs_request_limit : u16 ,
56+ /// Limit of max IPFS attempts to retrieve a file.
57+ ///
58+ /// Set by the environment variable `GRAPH_IPFS_MAX_ATTEMPTS`. Defaults to 100000.
59+ pub ipfs_max_attempts : usize ,
5660
5761 /// Set by the flag `GRAPH_ALLOW_NON_DETERMINISTIC_IPFS`. Off by
5862 /// default.
@@ -94,6 +98,7 @@ impl From<InnerMappingHandlers> for EnvVarsMapping {
9498 max_ipfs_map_file_size : x. max_ipfs_map_file_size . 0 ,
9599 max_ipfs_file_bytes : x. max_ipfs_file_bytes . 0 ,
96100 ipfs_request_limit : x. ipfs_request_limit ,
101+ ipfs_max_attempts : x. ipfs_max_attempts ,
97102 allow_non_deterministic_ipfs : x. allow_non_deterministic_ipfs . 0 ,
98103 disable_declared_calls : x. disable_declared_calls . 0 ,
99104 store_errors_are_nondeterministic : x. store_errors_are_nondeterministic . 0 ,
@@ -127,6 +132,8 @@ pub struct InnerMappingHandlers {
127132 max_ipfs_file_bytes : WithDefaultUsize < usize , { 25 * 1024 * 1024 } > ,
128133 #[ envconfig( from = "GRAPH_IPFS_REQUEST_LIMIT" , default = "100" ) ]
129134 ipfs_request_limit : u16 ,
135+ #[ envconfig( from = "GRAPH_IPFS_MAX_ATTEMPTS" , default = "100000" ) ]
136+ ipfs_max_attempts : usize ,
130137 #[ envconfig( from = "GRAPH_ALLOW_NON_DETERMINISTIC_IPFS" , default = "false" ) ]
131138 allow_non_deterministic_ipfs : EnvVarBoolean ,
132139 #[ envconfig( from = "GRAPH_DISABLE_DECLARED_CALLS" , default = "false" ) ]
0 commit comments