@@ -24,24 +24,24 @@ var (
2424 apiDefaultSecretKey = common .GetEnv ("SECRET_KEY" , "" )
2525 apiDefaultLogTag = os .Getenv ("LOG_TAG" )
2626
27- apiDefaultPprofEnabled = os .Getenv ("PPROF" ) == "1"
27+ apiDefaultPprofListenAddr = os .Getenv ("PPROF_ADDR" )
2828 apiDefaultInternalAPIEnabled = os .Getenv ("ENABLE_INTERNAL_API" ) == "1"
2929
3030 // Default Builder, Data, and Proposer API as true.
3131 apiDefaultBuilderAPIEnabled = os .Getenv ("DISABLE_BUILDER_API" ) != "1"
3232 apiDefaultDataAPIEnabled = os .Getenv ("DISABLE_DATA_API" ) != "1"
3333 apiDefaultProposerAPIEnabled = os .Getenv ("DISABLE_PROPOSER_API" ) != "1"
3434
35- apiListenAddr string
36- apiPprofEnabled bool
37- apiSecretKey string
38- apiBlockSimURL string
39- apiDebug bool
40- apiBuilderAPI bool
41- apiDataAPI bool
42- apiInternalAPI bool
43- apiProposerAPI bool
44- apiLogTag string
35+ apiListenAddr string
36+ apiPprofListenAddr string
37+ apiSecretKey string
38+ apiBlockSimURL string
39+ apiDebug bool
40+ apiBuilderAPI bool
41+ apiDataAPI bool
42+ apiInternalAPI bool
43+ apiProposerAPI bool
44+ apiLogTag string
4545)
4646
4747func init () {
@@ -63,7 +63,8 @@ func init() {
6363 apiCmd .Flags ().StringVar (& apiBlockSimURL , "blocksim" , apiDefaultBlockSim , "URL for block simulator" )
6464 apiCmd .Flags ().StringVar (& network , "network" , defaultNetwork , "Which network to use" )
6565
66- apiCmd .Flags ().BoolVar (& apiPprofEnabled , "pprof" , apiDefaultPprofEnabled , "enable pprof API" )
66+ apiCmd .Flags ().StringVar (& apiPprofListenAddr , "pprof-listen-addr" , apiDefaultPprofListenAddr , "listen address for pprof, empty to disable" )
67+
6768 apiCmd .Flags ().BoolVar (& apiBuilderAPI , "builder-api" , apiDefaultBuilderAPIEnabled , "enable builder API (/builder/...)" )
6869 apiCmd .Flags ().BoolVar (& apiDataAPI , "data-api" , apiDefaultDataAPIEnabled , "enable data API (/data/...)" )
6970 apiCmd .Flags ().BoolVar (& apiInternalAPI , "internal-api" , apiDefaultInternalAPIEnabled , "enable internal API (/internal/...)" )
@@ -165,11 +166,12 @@ var apiCmd = &cobra.Command{
165166 EthNetDetails : * networkInfo ,
166167 BlockSimURL : apiBlockSimURL ,
167168
169+ PprofListenAddr : apiPprofListenAddr ,
170+
168171 BlockBuilderAPI : apiBuilderAPI ,
169172 DataAPI : apiDataAPI ,
170173 InternalAPI : apiInternalAPI ,
171174 ProposerAPI : apiProposerAPI ,
172- PprofAPI : apiPprofEnabled ,
173175 }
174176
175177 // Decode the private key
0 commit comments