File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -231,10 +231,8 @@ func handleHasTx(c *gin.Context) {
231231 }
232232
233233 // Connect to cardano-node and check for transaction
234- errorChan := make (chan error )
235234 oConn , err := ouroboros .NewConnection (
236235 ouroboros .WithNetworkMagic (uint32 (cfg .Node .NetworkMagic )),
237- ouroboros .WithErrorChan (errorChan ),
238236 ouroboros .WithNodeToNode (false ),
239237 )
240238 if err != nil {
@@ -255,14 +253,6 @@ func handleHasTx(c *gin.Context) {
255253 return
256254 }
257255 }
258- // Start async error handler
259- go func () {
260- err , ok := <- errorChan
261- if ok {
262- logger .Errorf ("failure communicating with node: %s" , err )
263- c .JSON (500 , "failure communicating with node" )
264- }
265- }()
266256 defer func () {
267257 // Close Ouroboros connection
268258 oConn .Close ()
@@ -271,6 +261,7 @@ func handleHasTx(c *gin.Context) {
271261 if err != nil {
272262 logger .Errorf ("failure getting transaction: %s" , err )
273263 c .JSON (500 , fmt .Sprintf ("failure getting transaction: %s" , err ))
264+ return
274265 }
275266 if ! hasTx {
276267 c .JSON (404 , "transaction not found in mempool" )
You can’t perform that action at this time.
0 commit comments