Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.2: fix: multiple named tuple result from contract #1365

Merged
merged 11 commits into from
Jul 11, 2023
2 changes: 1 addition & 1 deletion docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ nav_order: 2
|address|The IP address on which the metrics HTTP API should listen|`int`|`127.0.0.1`
|enabled|Enables the metrics API|`boolean`|`true`
|path|The path from which to serve the Prometheus metrics|`string`|`/metrics`
|port|The port on which the metrics HTTP API should listen|`int`|`6000`
|port|The port on which the metrics HTTP API should listen|`int`|`7000`
|publicURL|The fully qualified public URL for the metrics API. This is used for building URLs in HTTP responses and in OpenAPI Spec generation|URL `string`|`<nil>`
|readTimeout|The maximum time to wait when reading from an HTTP connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`15s`
|shutdownTimeout|The maximum amount of time to wait for any open HTTP requests to finish before shutting down the HTTP server|[`time.Duration`](https://pkg.go.dev/time#Duration)|`10s`
Expand Down
2 changes: 1 addition & 1 deletion internal/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type apiServer struct {
func InitConfig() {
httpserver.InitHTTPConfig(apiConfig, 5000)
httpserver.InitHTTPConfig(spiConfig, 5001)
httpserver.InitHTTPConfig(metricsConfig, 6000)
httpserver.InitHTTPConfig(metricsConfig, 7000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that we want to change the default metrics port in a patch release. Was there a reason for this change?

httpserver.InitCORSConfig(corsConfig)
initMetricsConfig(metricsConfig)
}
Expand Down
6 changes: 2 additions & 4 deletions internal/blockchain/ethereum/ethereum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2621,10 +2621,9 @@ func TestQueryContractMultipleUnnamedOutputOK(t *testing.T) {
assert.Equal(t, "Query", headers["type"])
assert.Equal(t, "customValue", body["customOption"].(string))
assert.Equal(t, "0x12345", body["to"].(string))
assert.Equal(t, "0x01020304", body["from"].(string))
return httpmock.NewJsonResponderOrPanic(200, output)(req)
})
result, err := e.QueryContract(context.Background(), "0x01020304", fftypes.JSONAnyPtrBytes(locationBytes), method, params, errors, options)
result, err := e.QueryContract(context.Background(), fftypes.JSONAnyPtrBytes(locationBytes), method, params, errors, options)
assert.NoError(t, err)
j, err := json.Marshal(result)
assert.NoError(t, err)
Expand Down Expand Up @@ -2669,10 +2668,9 @@ func TestQueryContractNamedOutputOK(t *testing.T) {
assert.Equal(t, "Query", headers["type"])
assert.Equal(t, "customValue", body["customOption"].(string))
assert.Equal(t, "0x12345", body["to"].(string))
assert.Equal(t, "0x01020304", body["from"].(string))
return httpmock.NewJsonResponderOrPanic(200, output)(req)
})
result, err := e.QueryContract(context.Background(), "0x01020304", fftypes.JSONAnyPtrBytes(locationBytes), method, params, errors, options)
result, err := e.QueryContract(context.Background(), fftypes.JSONAnyPtrBytes(locationBytes), method, params, errors, options)
assert.NoError(t, err)
j, err := json.Marshal(result)
assert.NoError(t, err)
Expand Down