IntersectMBO / IntersectMBO/ouroboros-consensus

Use same Iterator for ChainDB as for the ImmutableDB

Open
#623 0 comments 0 reactions 0 assignees View on GitHub
technical debt
Dominant language
Haskell
Stars
67
Forks
43
Avg merge
5d 13h
Merged PRs (30d)
43

Description

After input-output-hk/ouroboros-network#2534, we could use the same `Iterator` and `IteratorResult` records for both the ChainDB and the ImmutableDB.

The remaining differences are:
* In ImmutableDB but not in ChainDB:
```haskell
iteratorHasNext :: HasCallStack => STM m (Maybe (RealPoint blk))
```
I think we can just add it to the ChainDB.
* The ChainDB's `IteratorResult` has the following constructor that the ImmutableDB's doesn't have:
```haskell
IteratorBlockGCed (RealPoint blk)
```
We can instantiate `IteratorResult` with `Either (BlockGCed blk) b` instead of `b` for the ChainDB.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.