Skip to content

Commit

Permalink
better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
cardenaso11 committed May 8, 2024
1 parent ec898fa commit 38bc09b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hydra-node/src/Hydra/Chain/Offline.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ loadGenesisFile ledgerGenesisFile =
pure shelleyGenesisDefaults{sgSystemStart = now}
Just fp ->
readJsonFileThrow (parseJSON @(ShelleyGenesis StandardCrypto)) fp
`catch` \(e :: IOException) -> do
putStrLn $ "Failed to parse initial UTXO" <> fp
putStrLn $ "Example UTXO: " <> "
{\"1541287c2598ffc682742c961a96343ac64e9b9030e6b03a476bb18c8c50134d#0\":{\"address\":\"addr_test1vqg9ywrpx6e50uam03nlu0ewunh3yrscxmjayurmkp52lfskgkq5k\",\"datum\":null,\"datumhash\":null,\"inlineDatum \":null,\"referenceScript\":null,\"value\":{\"lovelace\":100000000}},\"39786f186d94d8dd0b4fcf05d1458b18cd5fd8c6823364612f4a3c11b77e7cc7#0\":{\"address\":\"addr_test1vru2drx33ev6dt8gfq245r5k0tmy7ngqe79va69de9dxkrg09c7d3\",\"datum\":null,\"datumhash\":null,\"inlineDatum\":null,\"referenceScript\":null,\"value\":{\"lovelace\":100000000}}}
"
e

withOfflineChain ::
OfflineChainConfig ->
Expand Down

0 comments on commit 38bc09b

Please sign in to comment.