forked from cerc-io/ipld-eth-server
fix index out of range on lightSync; hopefully the new integration tests will catch them next time :)
This commit is contained in:
parent
65cb6e9092
commit
c5d513e96d
@ -45,11 +45,15 @@ func (client RpcClient) SupportedModules() (map[string]string, error) {
|
|||||||
|
|
||||||
func (client RpcClient) BatchCall(batch []BatchElem) error {
|
func (client RpcClient) BatchCall(batch []BatchElem) error {
|
||||||
var rpcBatch []rpc.BatchElem
|
var rpcBatch []rpc.BatchElem
|
||||||
for index, batchElem := range batch {
|
for _, batchElem := range batch {
|
||||||
rpcBatch[index].Result = batchElem.Result
|
var newBatchElem = rpc.BatchElem{
|
||||||
rpcBatch[index].Method = batchElem.Method
|
Result: batchElem.Result,
|
||||||
rpcBatch[index].Args = batchElem.Args
|
Method: batchElem.Method,
|
||||||
rpcBatch[index].Error = batchElem.Error
|
Args: batchElem.Args,
|
||||||
|
Error: batchElem.Error,
|
||||||
|
}
|
||||||
|
|
||||||
|
rpcBatch = append(rpcBatch, newBatchElem)
|
||||||
}
|
}
|
||||||
return client.client.BatchCall(rpcBatch)
|
return client.client.BatchCall(rpcBatch)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user