Skip to content

Commit c244bcd

Browse files
committed
smp-server: inline mapSyncEthExn
Single-use one-liner that discarded its argument — the exception text was already logged immediately above the call site by the N7 fix. The function was a remnant from before that logging was added. Inline the constant return at the call site; the line is gone.
1 parent 2fca0c9 commit c244bcd

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/Simplex/Messaging/Server/Names/Resolver.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ coalesce env@NamesEnv {inflight} key now = do
195195
E.throwIO e
196196
| otherwise -> do
197197
logError $ "[NAMES] resolver fetch raised " <> T.pack (E.displayException e)
198-
pure (Left (mapSyncEthExn e))
198+
pure (Left EthHttpErr)
199199
atomically $ do
200200
putTMVar mv r
201201
modifyTVar' inflight (PSQ.delete key)
@@ -205,9 +205,6 @@ coalesce env@NamesEnv {inflight} key now = do
205205
Left _ -> pure () -- transient errors (HTTP, decode, timeout) are not cached
206206
pure r
207207

208-
mapSyncEthExn :: E.SomeException -> ResolveError
209-
mapSyncEthExn _ = EthHttpErr
210-
211208
fetchOnceTimed :: NamesEnv -> ByteString -> IO (Either ResolveError NameRecord)
212209
fetchOnceTimed env key =
213210
timeout (rpcTimeoutMs (config env) * 1000) (fetchOnce env key) >>= \case

0 commit comments

Comments
 (0)