File tree Expand file tree Collapse file tree 5 files changed +193
-170
lines changed
Expand file tree Collapse file tree 5 files changed +193
-170
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,9 @@ createOptimizedConnectionPool :: BS.ByteString -> IO (Pool Connection)
7070createOptimizedConnectionPool connectionString = createPool
7171 (connectPostgreSQL connectionString) -- Connection creation function
7272 close -- Connection destruction function
73- 1 -- Number of stripes (sub-pools )
74- 60 -- Idle timeout (seconds )
75- 50 -- Maximum number of connections per stripe
73+ 1 -- Idle timeout (seconds )
74+ 2 -- Number of stripes (sub-pools )
75+ 60 -- Maximum number of connections per stripe
7676
7777proxyAPI :: Proxy (VVAApi :<|> SwaggerAPI )
7878proxyAPI = Proxy
Original file line number Diff line number Diff line change @@ -60,4 +60,9 @@ getStakeKeyVotingPower stakeKey = withPool $ \conn -> do
6060 Text. putStrLn (" couldn't fetch voting power for stake key: " <> stakeKey)
6161 return 0
6262 Right [(votingPower,_)] -> return $ floor votingPower
63- _ -> error (" multiple voting power entries for stake key: " <> unpack stakeKey)
63+ Right [] -> do
64+ Text. putStrLn (" No voting power found for stake key: " <> stakeKey)
65+ return 0
66+ Right _ -> do
67+ Text. putStrLn (" Unexpected result for stake key: " <> stakeKey)
68+ return 0
You can’t perform that action at this time.
0 commit comments