You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getStakeKeyVotingPower stakeKey = withPool $ \conn -> do
liftIO $ do
result <- try $ SQL.query @_ @(Scientific, ByteString) conn getVotingPowerSql (SQL.Only stakeKey)
case result of
Left (e :: SomeException) -> do
Text.putStrLn ("couldn't fetch voting power for stake key: " <> stakeKey)
return 0
Right [(votingPower,_)] -> return $ floor votingPower
_ -> error ("multiple voting power entries for stake key: " <> unpack stakeKey)
When stake key is missing error message is multiple voting power entries for stake key.
Expected
voting power should be 0 when stake key is not present in database
Sentry Issue: GOVTOOL-BACKEND-1D5
The text was updated successfully, but these errors were encountered: