File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 8080 # CARDANO_NODE_SOCKET_TCP_PORT environment variables
8181 address:
8282 port:
83+
84+ # Timeout for connections to cardano-node
85+ #
86+ # This can also be set via the CARDANO_NODE_SOCKET_TIMEOUT environment
87+ # variable
88+ timeout:
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ func handleSubmitTx(c *gin.Context) {
179179 ouroboros .WithNodeToNode (false ),
180180 ouroboros .WithLocalTxSubmissionConfig (
181181 localtxsubmission .NewConfig (
182- localtxsubmission .WithTimeout (5 * time .Second ),
182+ localtxsubmission .WithTimeout (time . Duration ( cfg . Node . Timeout ) * time .Second ),
183183 ),
184184 ),
185185 )
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ type NodeConfig struct {
4343 Address string `yaml:"address" envconfig:"CARDANO_NODE_SOCKET_TCP_HOST"`
4444 Port uint `yaml:"port" envconfig:"CARDANO_NODE_SOCKET_TCP_PORT"`
4545 SocketPath string `yaml:"socketPath" envconfig:"CARDANO_NODE_SOCKET_PATH"`
46+ Timeout uint `yaml:"timeout" envconfig:"CARDANO_NODE_SOCKET_TIMEOUT"`
4647}
4748
4849// Singleton config instance with default values
@@ -66,6 +67,7 @@ var globalConfig = &Config{
6667 Node : NodeConfig {
6768 Network : "mainnet" ,
6869 SocketPath : "/node-ipc/node.socket" ,
70+ Timeout : 30 ,
6971 },
7072}
7173
You can’t perform that action at this time.
0 commit comments