rpc/server: limit the maximum number of elements for get*transfers

This commit is contained in:
Roman Khimov 2020-09-14 17:48:17 +03:00
parent 970de84130
commit 6b7ca0ce3f
2 changed files with 13 additions and 0 deletions

View file

@ -175,6 +175,11 @@ var rpcTestCases = map[string][]rpcTestCase{
params: `["` + testchain.PrivateKeyByID(0).Address() + `", "1", "2", "bleh"]`,
fail: true,
},
{
name: "invalid limit 3",
params: `["` + testchain.PrivateKeyByID(0).Address() + `", "1", "2", "100500"]`,
fail: true,
},
{
name: "invalid page",
params: `["` + testchain.PrivateKeyByID(0).Address() + `", "1", "2", "3", "-1"]`,