github.com/theQRL/go-zond@v0.1.1/rpc/testdata/invalid-batch-toolarge.js (about)

     1  // This file checks the behavior of the batch item limit code.
     2  // In tests, the batch item limit is set to 4. So to trigger the error,
     3  // all batches in this file have 5 elements.
     4  
     5  // For batches that do not contain any calls, a response message with "id" == null
     6  // is returned.
     7  
     8  --> [{"jsonrpc":"2.0","method":"test_echo","params":["x",99]},{"jsonrpc":"2.0","method":"test_echo","params":["x",99]},{"jsonrpc":"2.0","method":"test_echo","params":["x",99]},{"jsonrpc":"2.0","method":"test_echo","params":["x",99]},{"jsonrpc":"2.0","method":"test_echo","params":["x",99]}]
     9  <-- [{"jsonrpc":"2.0","id":null,"error":{"code":-32600,"message":"batch too large"}}]
    10  
    11  // For batches with at least one call, the call's "id" is used.
    12  --> [{"jsonrpc":"2.0","method":"test_echo","params":["x",99]},{"jsonrpc":"2.0","id":3,"method":"test_echo","params":["x",99]},{"jsonrpc":"2.0","method":"test_echo","params":["x",99]},{"jsonrpc":"2.0","method":"test_echo","params":["x",99]},{"jsonrpc":"2.0","method":"test_echo","params":["x",99]}]
    13  <-- [{"jsonrpc":"2.0","id":3,"error":{"code":-32600,"message":"batch too large"}}]