Skip to content

Commit d526d42

Browse files
committed
integrate changes from punkhazardlabs/txpool-viz#37
1 parent d076a75 commit d526d42

2 files changed

Lines changed: 24 additions & 12 deletions

File tree

src/txpool_viz/txpool_viz.star

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,18 @@ def launch_txpool_viz(
3131
"Socket": participant.el_context.ws_url
3232
})
3333

34-
txpoolviz_params["endpoints"] = endpoint_list
34+
beacon_endpoints = []
35+
for participant in network_participants:
36+
beacon_endpoints.append({
37+
"Name": participant.cl_context.beacon_service_name,
38+
"BeaconUrl": participant.cl_context.beacon_http_url,
39+
})
3540

3641

37-
# add beacon sse if focil_enabled?
38-
if txpoolviz_params["focil_enabled"] == "true":
39-
txpoolviz_params["beacon_sse_url"] = network_participants[0].cl_context.beacon_http_url
42+
txpoolviz_params["endpoints"] = endpoint_list
43+
txpoolviz_params["beacon_endpoints"] = beacon_endpoints
44+
45+
txpoolviz_params["endpoints"] = endpoint_list
4046

4147
# // config data & template
4248
template_data = txpool_viz_config_template_data(txpoolviz_params)
@@ -107,6 +113,7 @@ def txpool_viz_config_template_data(config):
107113
}
108114

109115
if config["focil_enabled"] == "true":
110-
cfg["BeaconSSEUrl"] = config["beacon_sse_url"]
116+
cfg["FocilEnabled"]= config["focil_enabled"]
117+
cfg["BeaconEndpoints"] = config["beacon_endpoints"]
111118

112119
return cfg
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
endpoints:
2-
{{- range $endpoint := .Endpoints }}
3-
- name: {{ $endpoint.Name }}
4-
rpc_url: "{{ $endpoint.RPCUrl }}"
5-
socket: "{{ $endpoint.Socket }}"
2+
{{- range .Endpoints }}
3+
- name: {{ .Name }}
4+
rpc_url: "{{ .RPCUrl }}"
5+
socket: "{{ .Socket }}"
66
{{- end }}
77

8-
{{- if .BeaconSSEUrl }}
9-
beacon_sse_url: "{{ .BeaconSSEUrl }}"
8+
{{- if eq .FocilEnabled "true" }}
9+
focil_enabled: true
10+
beacon_urls:
11+
{{- range .BeaconEndpoints }}
12+
- name: {{ .Name }}
13+
beacon_url: "{{ .BeaconUrl }}"
14+
{{- end }}
1015
{{- end }}
1116

1217
polling:
1318
interval: {{ .Polling.interval }}
1419
timeout: {{ .Polling.timeout }}
1520

1621
filters:
17-
min_gas_price: {{ .Filters.min_gas_price }}
22+
min_gas_price: {{ .Filters.MinGasPrice }}
1823

1924
log_level: "{{ .LogLevel }}"

0 commit comments

Comments
 (0)