File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ func TestGRPCAsk(t *testing.T) {
40
40
maxSize int
41
41
predicateBlacklist []string
42
42
maxGas uint64
43
+ maxVariables uint64
43
44
predicateCosts map [string ]uint64
44
45
expectedAnswer * types.Answer
45
46
expectedError string
@@ -153,6 +154,11 @@ func TestGRPCAsk(t *testing.T) {
153
154
},
154
155
expectedError : "out of gas: logic <block_height/1> (11167/3000): limit exceeded" ,
155
156
},
157
+ {
158
+ query : "length(List, 100000)." ,
159
+ maxVariables : 1000 ,
160
+ expectedError : "maximum number of variables reached: limit exceeded" ,
161
+ },
156
162
{
157
163
program : "father(bob, 'élodie')." ,
158
164
query : "father(bob, X)." ,
@@ -351,6 +357,8 @@ foo(a4).
351
357
params := types .DefaultParams ()
352
358
params .Limits .MaxResultCount = & maxResultCount
353
359
params .Limits .MaxSize = & maxSize
360
+ maxVariables := sdkmath .NewUint (tc .maxVariables )
361
+ params .Limits .MaxVariables = & maxVariables
354
362
if tc .predicateBlacklist != nil {
355
363
params .Interpreter .PredicatesFilter .Blacklist = tc .predicateBlacklist
356
364
}
You can’t perform that action at this time.
0 commit comments