PLT-8339: Fix SQL instances for ChainPoint and ChainTip #224
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Both
ChainPoint
andChainTip
can refer to the genesis block, in this case they don't carry any data. This should be reflected in the SQL representation correctly, therefore we need to make the changes in this PR.@berewt pointed out the tests in
marconi/marconi-chain-index/test/Spec/Marconi/ChainIndex/Orphans.hs
Line 103 in 830f9ea
RowParser
, and the SQL package we use doesn't seem to have a way to run this parser in a pure context. I am 100% open to suggestions, let me know if there's something I'm missing here!Also, there doesn't seem to be a way to return errors from the
RowParser
context, so I had to throw exceptions. Please let me know if we need to do something else here.Pre-submit checklist: