Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also trace the times of stake distribution LSQ queries #2080

Merged
merged 1 commit into from
Aug 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/shelley/src/Cardano/Wallet/Shelley/Network.hs
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,13 @@ withNetworkLayer tr np addrInfo versionData action = do

_stakeDistribution queue bh coin = do
let pt = toPoint getGenesisBlockHash bh
stakeMap <- handleQueryFailure
stakeMap <- handleQueryFailure $ timeQryAndLog "GetStakeDistribution" tr
(queue `send` CmdQueryLocalState pt (QueryIfCurrentShelley Shelley.GetStakeDistribution))
let toStake = Set.singleton $ Left $ toShelleyCoin coin
liftIO $ traceWith tr $ MsgWillQueryRewardsForStake coin
rewardsPerAccount <- handleQueryFailure
rewardsPerAccount <- handleQueryFailure $ timeQryAndLog "GetNonMyopicMemberRewards" tr
(queue `send` CmdQueryLocalState pt (QueryIfCurrentShelley (Shelley.GetNonMyopicMemberRewards toStake)))
pparams <- handleQueryFailure
pparams <- handleQueryFailure $ timeQryAndLog "GetCurrentPParams" tr
(queue `send` CmdQueryLocalState pt (QueryIfCurrentShelley Shelley.GetCurrentPParams))

let fromJustRewards = fromMaybe (error "stakeDistribution: requested rewards not included in response")
Expand Down