-
Notifications
You must be signed in to change notification settings - Fork 217
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
Better errors for --genesis-block
and --bft-leaders
#517
Conversation
getBlockId :: Get (Hash "BlockHeader") | ||
getBlockId = do | ||
getBlockId = lookAhead getBlock *> (label "getBlockId" $ do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't thought of it initially but, we don't have to actually unserialize and re-serialize the block. We can simply "lookAhead". If this fails, we know that we haven't a block and the rest is irrelevant. Hence I removed the note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good (although CI complains about code style)
It would be good to polish also error for serve --genesis-hash
, (which might be done in another PR though) :
$ cardano-wallet-jormungandr serve --genesis-hash a074427d61ec13c4401cc3c7ead26c49d53baa5e8c1391189dd1cef13bd38031
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 09:31:52.84 UTC] Wallet backend server starting...
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 09:31:52.84 UTC] Running as v2019.6.24
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 09:31:52.84 UTC] Node is Jörmungandr on testnet
cardano-wallet-jormungandr: user error (unexpected error: ErrGetBlockNotFound (Hash {getHash = "\160tB}a\236\DC3\196@\FS\195\199\234\210lI\213;\170^\140\DC3\145\CAN\157\209\206\241;\211\128\&1"}))
…y manner This could happen when launching the wallet 'from scratch', where the bridge would have to sync the first part of the chain. This can be rather long depending on the available network connection.
This is because 20 seconds seems to be too small when launching the chain from scratch in the case of http-bridge.
52a843c
to
5e68106
Compare
Issue Number
#357
Overview
--genesis-block
or--bft-leaders
options--genesis-block
Comments