1
0
Fork 0
forked from forks/go-ethereum
go-ethereum-modded-tocallarg/node
Daniel Liu 86a492471a
node: avoid double close resp.Body (#31710)
The functions `rpcRequest` and `batchRpcRequest` call `baseRpcRequest`.
And `resp.Body` will be closed in the function `baseRpcRequest` later by
`t.Cleanup`:

```go
func baseRpcRequest(t *testing.T, url, bodyStr string, extraHeaders ...string) *http.Response {
        // ......
	t.Cleanup(func() { resp.Body.Close() })
	return resp
}
```
2025-05-02 09:21:17 -06:00
..
api.go
api_test.go
config.go
config_test.go build: replace tenv linter with usetesting (#31172) 2025-02-21 13:36:18 +01:00
database.go core, eth, node: use sync write option in pebble (#31519) 2025-04-03 16:03:03 +02:00
defaults.go
doc.go
endpoints.go
errors.go
jwt_auth.go
jwt_handler.go
lifecycle.go
node.go
node_auth_test.go
node_example_test.go
node_test.go
rpcstack.go
rpcstack_test.go node: avoid double close resp.Body (#31710) 2025-05-02 09:21:17 -06:00
utils_test.go