Skip to content

Commit

Permalink
db-sync: Minor tweaks to logging output
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd committed Nov 29, 2020
1 parent 0f73655 commit f977b93
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cardano-db-sync/src/Cardano/DbSync/Era/Byron/Genesis.hs
Expand Up @@ -140,20 +140,19 @@ validateGenesisDistribution tracer networkName cfg bid =
, textShow txCount
]
totalSupply <- lift DB.queryGenesisSupply
case configGenesisSupply cfg of
case DB.word64ToAda <$> configGenesisSupply cfg of
Left err -> dbSyncNodeError $ "validateGenesisDistribution: " <> textShow err
Right expectedSupply ->
when (DB.word64ToAda expectedSupply /= totalSupply) $
when (expectedSupply /= totalSupply) $
dbSyncNodeError $ Text.concat
[ "validateGenesisDistribution: Expected total supply to be "
, textShow expectedSupply
, DB.renderAda expectedSupply
, " but got "
, textShow totalSupply
, DB.renderAda totalSupply
]
supply <- lift DB.queryGenesisSupply
liftIO $ do
logInfo tracer "Initial genesis distribution present and correct"
logInfo tracer ("Total genesis supply of Ada: " <> DB.renderAda supply)
logInfo tracer ("Total genesis supply of Ada: " <> DB.renderAda totalSupply)

-- -----------------------------------------------------------------------------

Expand Down

0 comments on commit f977b93

Please sign in to comment.